Skip to content
Snippets Groups Projects
Commit 4bff33c3 authored by Ian Jackson's avatar Ian Jackson
Browse files

Provide an error variant for external directory providers

parent 952aef1b
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,17 @@ pub enum Error {
cause: Arc<SpawnError>,
},
/// Other error from an external directory provider
#[error("external directory provider")]
ExternalDirProvider {
/// What happened
#[source]
cause: Arc<dyn std::error::Error + Send + Sync + 'static>,
/// The kind
kind: ErrorKind,
},
/// A programming problem, either in our code or the code calling it.
#[error("programming problem: {0}")]
Bug(#[from] tor_error::Bug),
......@@ -168,6 +179,7 @@ impl HasKind for Error {
E::IOError(_) => EK::CacheAccessFailed,
E::OfflineMode => EK::BadApiUsage,
E::Spawn { cause, .. } => cause.kind(),
E::ExternalDirProvider { kind, .. } => *kind,
E::Bug(e) => e.kind(),
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment