forked from 1b-agent/fieldcraft-upstream
model: a cancel flag on Progress and progress::check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
3363181a01
commit
a2d646a75e
2 files changed
+48
No files matched your search
@@ -110,6 +110,10 @@ pub enum Error {
|
||||
/// A definition cannot be deleted while another refers to it.
|
||||
#[error("in use: {0}")]
|
||||
InUse(String),
|
||||
/// The command was cancelled while it ran ([`progress::Progress::cancel`]); it left
|
||||
/// nothing behind.
|
||||
#[error("cancelled")]
|
||||
Cancelled,
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
@@ -366,6 +370,7 @@ pub(crate) fn context(what: &str, name: &str, e: Error) -> Error {
|
||||
Error::NotFound(m) => Error::NotFound(format!("{what} `{shown}`: {m}")),
|
||||
Error::Limit(m) => Error::Limit(format!("{what} `{shown}`: {m}")),
|
||||
Error::InUse(m) => Error::InUse(format!("{what} `{shown}`: {m}")),
|
||||
Error::Cancelled => Error::Cancelled,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user