Skip to main content

sandbox_quant/error/
app_error.rs

1use thiserror::Error;
2
3use crate::error::exchange_error::ExchangeError;
4use crate::error::execution_error::ExecutionError;
5use crate::error::storage_error::StorageError;
6use crate::error::sync_error::SyncError;
7use crate::error::ui_error::UiError;
8
9#[derive(Debug, Error)]
10pub enum AppError {
11    #[error("exchange error: {0}")]
12    Exchange(#[from] ExchangeError),
13    #[error("execution error: {0}")]
14    Execution(#[from] ExecutionError),
15    #[error("sync error: {0}")]
16    Sync(#[from] SyncError),
17    #[error("storage error: {0}")]
18    Storage(#[from] StorageError),
19    #[error("ui error: {0}")]
20    Ui(#[from] UiError),
21}