diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-05 22:35:05 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-05 22:35:05 +0800 |
| commit | 27f6414ad1ff451feb0044af62f37dc2a6255ffa (patch) | |
| tree | cb5693bc014cc8579dcf02a730fd4d2a5dfcf1a5 /legacy_actions/src/connection/error.rs | |
| parent | ade2fcb9302a4ab759795820dbde3b2b269490ee (diff) | |
Remove examples and legacy code, update .gitignore
- Delete examples directory and its example action system
- Rename actions/ to legacy_actions/ and data/ to legacy_data/
- Update Cargo.toml license file reference
- Move setup scripts to scripts/dev/ directory
- Add todo.txt patterns to .gitignore
Diffstat (limited to 'legacy_actions/src/connection/error.rs')
| -rw-r--r-- | legacy_actions/src/connection/error.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/legacy_actions/src/connection/error.rs b/legacy_actions/src/connection/error.rs new file mode 100644 index 0000000..1a4e221 --- /dev/null +++ b/legacy_actions/src/connection/error.rs @@ -0,0 +1,27 @@ +use std::io; +use thiserror::Error; +use vcs_data::data::member::MemberId; + +#[derive(Error, Debug, Clone)] +pub enum ConnectionError { + #[error("I/O error: {0}")] + Io(String), +} + +#[derive(Error, Debug, Clone)] +pub enum ProcessActionError { + #[error("Action `{0}` not registered")] + ActionNotRegistered(String), + + #[error("Authorize `{0}` failed")] + AuthorizeFailed(MemberId), + + #[error("Authorize host `{0}` failed")] + AuthorizeHostFailed(MemberId), +} + +impl From<io::Error> for ConnectionError { + fn from(error: io::Error) -> Self { + ConnectionError::Io(error.to_string()) + } +} |
