mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
main: catch unexpected exceptions
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+7
-1
@@ -12,4 +12,10 @@ def main(argv=None):
|
||||
Logger.error('Initialization error: {}'.format(str(ex)))
|
||||
return 255
|
||||
|
||||
return cmd.run_cmd()
|
||||
try:
|
||||
ret = cmd.run_cmd()
|
||||
except Exception as ex:
|
||||
Logger.error('Unexpected error: {}'.format(str(ex)))
|
||||
return 254
|
||||
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user