Lines Matching refs:Error
1 use crate::error::{Error, ErrorExt, OutOfMemory, Result, boxed::try_new_uninit_box};
113 fn context<C>(self, context: C) -> Result<T, Error> in context()
121 fn with_context<C, F>(self, f: F) -> Result<T, Error> in with_context()
129 E: core::error::Error + Send + Sync + 'static,
138 Err(e) => Err(Error::new(e).context(context)), in context()
150 Err(e) => Err(Error::new(e).context(f())), in with_context()
155 impl<T> Context<T, Error> for Result<T> {
156 fn context<C>(self, context: C) -> Result<T, Error> in context()
166 fn with_context<C, F>(self, f: F) -> Result<T, Error> in with_context()
185 None => Err(Error::from_error_ext(ContextError { in context()
199 None => Err(Error::from_error_ext(ContextError { in with_context()
217 pub(crate) error: Option<Error>,
238 impl<C> core::error::Error for ContextError<C>
242 fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { in source()
252 fn ext_as_dyn_core_error(&self) -> &(dyn core::error::Error + Send + Sync + 'static) { in ext_as_dyn_core_error()
258 ) -> Result<Box<dyn core::error::Error + Send + Sync + 'static>, OutOfMemory> { in ext_into_boxed_dyn_core_error()
263 fn ext_source(&self) -> Option<&Error> { in ext_source() argument
267 fn ext_source_mut(&mut self) -> Option<&mut Error> { in ext_source_mut() argument
290 fn ext_into_anyhow(mut self) -> anyhow::Error { in ext_into_anyhow() argument
292 Some(error) => anyhow::Error::from(error).context(self.context), in ext_into_anyhow()
293 None => anyhow::Error::msg(self), in ext_into_anyhow()