File size: 650 Bytes
190f7b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use std::path::PathBuf;

use thiserror::Error;

#[allow(dead_code)]
#[derive(Debug, Error)]
pub enum AppError {
    #[error("API请求失败:{0}")]
    Api(String),
    #[error("数据库错误:{0}")]
    Database(String),
    #[error("凭据错误:{0}")]
    Credential(String),
    #[error("导出失败:{0}")]
    Export(String),
    #[error("媒体处理失败:{0}")]
    Media(String),
    #[error("配置错误:{0}")]
    Configuration(String),
    #[error("任务错误:{0}")]
    Task(String),
    #[error("路径不可用:{path}")]
    PathUnavailable { path: PathBuf },
    #[error("操作已取消")]
    Cancelled,
}