issue #1700 replace raise Exception()

This commit is contained in:
Sebastian Hoogen
2014-08-24 14:33:10 +02:00
parent b0a7b0f274
commit c7cfee0539
19 changed files with 38 additions and 37 deletions

View File

@@ -18,7 +18,7 @@ def makeSnapshotWithGui():
for i in toplevel:
if i.metaObject().className() == "Gui::MainWindow":
return i
raise Exception("No main window found")
raise RuntimeError("No main window found")
mw=getMainWindow()
mw.hide()

View File

@@ -13,7 +13,7 @@ class DocumentObject(object):
def execute(self):
"this method is executed on object creation and whenever the document is recomputed"
raise Exception("Not yet implemented")
raise NotImplementedError("Not yet implemented")
def init(self):
#will be called just after object creation, you can use this for example to create properties

View File

@@ -84,8 +84,8 @@ class TaskPanel:
for i in toplevel:
if i.metaObject().className() == "Gui::MainWindow":
return i
raise Exception("No main window found")
raise RuntimeError("No main window found")
def addElement(self):
item=QtGui.QInputDialog.getText(self.form, 'Add item', 'Enter:')
if item[1]: