add wrong usage exception

This commit is contained in:
crazywhalecc
2023-03-29 21:39:36 +08:00
parent d31e1b00e8
commit b0ac50941f
13 changed files with 67 additions and 18 deletions

View File

@@ -6,6 +6,7 @@ namespace SPC\builder;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\exception\WrongUsageException;
use SPC\store\Config;
class Extension
@@ -62,7 +63,7 @@ class Extension
'enable' => '--enable-' . $_name,
'with' => '--with-' . $_name,
'none', 'custom' => '',
default => throw new RuntimeException("argType does not accept {$arg_type}, use [enable/with] ."),
default => throw new WrongUsageException("argType does not accept {$arg_type}, use [enable/with] ."),
};
}