mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Use general exception for usage error
This commit is contained in:
@ -46,7 +46,7 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
|
||||
try:
|
||||
return self._handle_obsolate_command(name)
|
||||
except AttributeError:
|
||||
raise exception.UnknownCLICommand(name)
|
||||
raise click.UsageError('No such command "%s"' % name, ctx)
|
||||
return mod.cli
|
||||
|
||||
@staticmethod
|
||||
|
@ -48,12 +48,6 @@ class PlatformNotInstalledYet(PlatformioException):
|
||||
"Use `platformio platforms install` command"
|
||||
|
||||
|
||||
class UnknownCLICommand(PlatformioException):
|
||||
|
||||
MESSAGE = "Unknown command '%s'. Please use `platformio --help`"\
|
||||
" to see all available commands"
|
||||
|
||||
|
||||
class UnknownBoard(PlatformioException):
|
||||
|
||||
MESSAGE = "Unknown board type '%s'"
|
||||
|
Reference in New Issue
Block a user