浏览代码

Catch plugin exceptions at App.run() as well

Alois Mahdal 11 年前
父节点
当前提交
4c0ac74b59
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      include/sardine.py

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

119
         sys.exit(rv)
119
         sys.exit(rv)
120
 
120
 
121
     def run(self):
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)