| 1 |
|
| 2 |
|
| 3 |
use thiserror::Error; |
| 4 |
|
| 5 |
|
| 6 |
#[derive(Error, Debug)] |
| 7 |
pub enum PluginError { |
| 8 |
|
| 9 |
#[error("manifest parse error: {0}")] |
| 10 |
ManifestParse(String), |
| 11 |
|
| 12 |
|
| 13 |
#[error("manifest missing field: {0}")] |
| 14 |
ManifestMissing(String), |
| 15 |
|
| 16 |
|
| 17 |
#[error("manifest invalid value: {0}")] |
| 18 |
ManifestInvalid(String), |
| 19 |
|
| 20 |
|
| 21 |
#[error("script compile error: {0}")] |
| 22 |
ScriptCompile(String), |
| 23 |
|
| 24 |
|
| 25 |
#[error("script runtime error: {0}")] |
| 26 |
ScriptRuntime(String), |
| 27 |
|
| 28 |
|
| 29 |
#[error("plugin I/O error: {0}")] |
| 30 |
Io(#[from] std::io::Error), |
| 31 |
} |
| 32 |
|