瀏覽代碼

Catch plugin exceptions at App.run() as well

Alois Mahdal 10 年之前
父節點
當前提交
4c0ac74b59
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      include/sardine.py

+ 4
- 1
include/sardine.py 查看文件

@@ -119,4 +119,7 @@ class App:
119 119
         sys.exit(rv)
120 120
 
121 121
     def run(self):
122
-        print self.subcommand.get_output()
122
+        try:
123
+            print self.subcommand.get_output()
124
+        except SardinePluginError as e:
125
+            self.die(e, 10)