eric6/E5Gui/E5TextEditSearchWidget.py

branch
maintenance
changeset 7642
72721823d453
parent 7560
343db73c4842
parent 7628
f904d0eef264
child 7824
096b3ebc1409
--- a/eric6/E5Gui/E5TextEditSearchWidget.py	Sun May 31 17:26:46 2020 +0200
+++ b/eric6/E5Gui/E5TextEditSearchWidget.py	Sat Jul 04 11:45:34 2020 +0200
@@ -185,8 +185,10 @@
         @type QTextEdit, QWebEngineView or QWebView
         @param editType type of the attached edit widget
         @type str (one of "QTextEdit", "QWebEngineView" or "QWebView")
+        @exception ValueError raised to indicate a bad parameter value
         """
-        assert editType in ["QTextEdit", "QWebEngineView", "QWebView"]
+        if editType not in ["QTextEdit", "QWebEngineView", "QWebView"]:
+            raise ValueError("Bad value for 'editType' parameter.")
         
         self.__textedit = textedit
         self.__texteditType = editType

eric ide

mercurial