diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-23 04:10:00 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-23 04:10:00 +0800 |
| commit | b1d571fd730efe257423ee1fcd00ff4121e24ebd (patch) | |
| tree | 8369ba680a5375fff5c6399a17052a3b8c56e3fb /actions/src/connection | |
| parent | 8713864b0351c71d250814a554e31dfd0499b741 (diff) | |
Add local actions modules and ProcessActionError enum
- Add local_actions module with account_manage and current_sheet
submodules
- Add ProcessActionError enum with authorization and registration
variants
- Add missing import for MemberId in error module
Diffstat (limited to 'actions/src/connection')
| -rw-r--r-- | actions/src/connection/error.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actions/src/connection/error.rs b/actions/src/connection/error.rs index 241c16e..1a4e221 100644 --- a/actions/src/connection/error.rs +++ b/actions/src/connection/error.rs @@ -1,5 +1,6 @@ use std::io; use thiserror::Error; +use vcs_data::data::member::MemberId; #[derive(Error, Debug, Clone)] pub enum ConnectionError { @@ -7,6 +8,18 @@ pub enum ConnectionError { 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()) |
