2019-01-11 23:18:34 +00:00
|
|
|
use crate::render::RenderError;
|
2019-06-06 14:48:41 +00:00
|
|
|
use client;
|
|
|
|
use std::any;
|
2019-01-11 23:18:34 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
/// Represents any error that may be triggered by Voxygen.
|
2019-01-11 23:18:34 +00:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Error {
|
2019-05-17 09:22:32 +00:00
|
|
|
/// An error relating to the internal client.
|
2019-01-12 15:57:19 +00:00
|
|
|
ClientError(client::Error),
|
2019-05-17 09:22:32 +00:00
|
|
|
/// A miscellaneous error relating to a backend dependency.
|
2019-07-02 21:29:38 +00:00
|
|
|
BackendError(Box<dyn any::Any>),
|
2019-05-17 09:22:32 +00:00
|
|
|
/// An error relating the rendering subsystem.
|
2019-01-11 23:18:34 +00:00
|
|
|
RenderError(RenderError),
|
2019-05-17 09:22:32 +00:00
|
|
|
/// A miscellaneous error with an unknown or unspecified source.
|
2019-01-11 23:18:34 +00:00
|
|
|
Other(failure::Error),
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<RenderError> for Error {
|
|
|
|
fn from(err: RenderError) -> Self {
|
|
|
|
Error::RenderError(err)
|
|
|
|
}
|
|
|
|
}
|
2019-01-12 15:57:19 +00:00
|
|
|
|
|
|
|
impl From<client::Error> for Error {
|
|
|
|
fn from(err: client::Error) -> Self {
|
|
|
|
Error::ClientError(err)
|
|
|
|
}
|
|
|
|
}
|