issue #1700 replace raise Exception()
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user