Spaces:
Runtime error
Runtime error
| //! Spec-Kit Error Types | |
| use thiserror::Error; | |
| /// Errors that can occur when interacting with spec-kit CLI | |
| pub enum SpecKitError { | |
| CliNotFound, | |
| PythonVersionTooOld, | |
| CommandFailed { | |
| command: String, | |
| stderr: String, | |
| exit_code: i32, | |
| }, | |
| ParseError(String), | |
| Timeout, | |
| InvalidPath(String), | |
| FileError(String), | |
| IoError( std::io::Error), | |
| } | |
| impl SpecKitError { | |
| /// Create a command failed error | |
| pub fn command_failed( | |
| command: impl Into<String>, | |
| stderr: impl Into<String>, | |
| exit_code: i32, | |
| ) -> Self { | |
| Self::CommandFailed { | |
| command: command.into(), | |
| stderr: stderr.into(), | |
| exit_code, | |
| } | |
| } | |
| } | |