aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs')
-rw-r--r--crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs b/crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs
new file mode 100644
index 00000000..4b27c5e6
--- /dev/null
+++ b/crates/shirabe-symfony-console/src/exception/command_not_found_exception.rs
@@ -0,0 +1,30 @@
+//! ref: composer/vendor/symfony/console/Exception/CommandNotFoundException.php
+
+use super::exception_interface::ExceptionInterface;
+
+#[derive(Debug)]
+pub struct CommandNotFoundException {
+ inner: shirabe_php_shim::InvalidArgumentException,
+ alternatives: Vec<String>,
+}
+
+impl CommandNotFoundException {
+ pub fn new(message: String, alternatives: Vec<String>, code: i64) -> Self {
+ Self {
+ inner: shirabe_php_shim::InvalidArgumentException::with_code(message, code),
+ alternatives,
+ }
+ }
+
+ pub fn get_alternatives(&self) -> &Vec<String> {
+ &self.alternatives
+ }
+}
+
+shirabe_php_shim::impl_php_exception!(
+ CommandNotFoundException,
+ inner,
+ r"Symfony\Component\Console\Exception\CommandNotFoundException"
+);
+
+impl ExceptionInterface for CommandNotFoundException {}