Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
oxigraph/src/errors.rs

27 lines
654 B

use std::fmt;
use std::sync::PoisonError;
error_chain! {
foreign_links {
Url(::url::ParseError);
Uuid(::uuid::ParseError);
RocksDB(::rocksdb::Error);
Utf8(::std::str::Utf8Error);
Io(::std::io::Error);
NTriples(::rio::ntriples::ParseError);
Turtle(::rio::turtle::ParseError);
SparqlParser(::sparql::parser::ParseError);
}
}
impl<T> From<PoisonError<T>> for Error {
fn from(_: PoisonError<T>) -> Self {
//TODO: improve conversion
"Unexpected lock error".into()
}
}
impl From<Error> for fmt::Error {
fn from(_: Error) -> Self {
fmt::Error
}
}