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::strategy_error::StrategyError;
7use crate::error::sync_error::SyncError;
8use crate::error::ui_error::UiError;
9
10#[derive(Debug, Error)]
11pub enum AppError {
12    #[error("exchange error: {0}")]
13    Exchange(#[from] ExchangeError),
14    #[error("execution error: {0}")]
15    Execution(#[from] ExecutionError),
16    #[error("sync error: {0}")]
17    Sync(#[from] SyncError),
18    #[error("storage error: {0}")]
19    Storage(#[from] StorageError),
20    #[error("strategy error: {0}")]
21    Strategy(#[from] StrategyError),
22    #[error("ui error: {0}")]
23    Ui(#[from] UiError),
24}