19
src/error.rs
19
src/error.rs
@@ -182,6 +182,25 @@ where
|
||||
InternalFrom(err, None).into()
|
||||
}
|
||||
|
||||
macro_rules! try_ {
|
||||
($e:expr) => (
|
||||
match $e {
|
||||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
return Err(::Error::from(::error::InternalFrom(err, None)));
|
||||
}
|
||||
}
|
||||
);
|
||||
($e:expr, $url:expr) => (
|
||||
match $e {
|
||||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
return Err(::Error::from(::error::InternalFrom(err, Some($url.clone()))));
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn loop_detected(url: Url) -> Error {
|
||||
Error {
|
||||
|
||||
Reference in New Issue
Block a user