summaryrefslogtreecommitdiff
path: root/dhall/src/error
diff options
context:
space:
mode:
authorNadrieril2020-03-04 21:26:01 +0000
committerNadrieril2020-03-05 15:58:54 +0000
commit903d6c0bba36a6696eb337ae84b962f4cc48b5b5 (patch)
tree63cb58b2b566fb5532e59b1455fffc82fa89ce0d /dhall/src/error
parent5a9a5859eec0cf7deebf7fa07fe99f8dc8722ec8 (diff)
Implement remote imports and cleanup import chaining
Diffstat (limited to 'dhall/src/error')
-rw-r--r--dhall/src/error/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index 5632ea6..29dd5ad 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -30,6 +30,7 @@ pub(crate) enum ImportError {
MissingEnvVar,
UnexpectedImport(Import<()>),
ImportCycle(ImportStack, Import<()>),
+ Url(url::ParseError),
}
#[derive(Debug)]
@@ -111,6 +112,11 @@ impl From<ParseError> for Error {
ErrorKind::Parse(err).into()
}
}
+impl From<url::ParseError> for Error {
+ fn from(err: url::ParseError) -> Error {
+ ErrorKind::Resolve(ImportError::Url(err)).into()
+ }
+}
impl From<DecodeError> for Error {
fn from(err: DecodeError) -> Error {
ErrorKind::Decode(err).into()