blob: 05567b01c24dcb3fd215857ebe166e71912e8d7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//! ref: composer/src/Composer/EventDispatcher/ScriptExecutionException.php
use shirabe_php_shim::RuntimeException;
/// Thrown when a script running an external process exits with a non-0 status code
#[derive(Debug)]
pub struct ScriptExecutionException(pub RuntimeException);
impl ScriptExecutionException {
pub fn get_code(&self) -> i64 {
self.0.code
}
pub fn get_message(&self) -> &str {
&self.0.message
}
}
impl std::fmt::Display for ScriptExecutionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}
impl std::error::Error for ScriptExecutionException {}
|