From 1a64567a977a756771ad85783067fe056c7a9da4 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 6 May 2020 08:33:55 +0200 Subject: pyflakes3: replace IllegalArgumentException by Exception (wizards) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IllegalArgumentException doesn't exist Change-Id: Ifea6f56d19fb58136ac5d992107ab7179ac943b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93524 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ --- wizards/com/sun/star/wizards/agenda/AgendaDocument.py | 2 +- wizards/com/sun/star/wizards/agenda/TopicsControl.py | 2 +- wizards/com/sun/star/wizards/document/OfficeDocument.py | 2 +- wizards/com/sun/star/wizards/text/TextSectionHandler.py | 2 +- wizards/com/sun/star/wizards/ui/UnoDialog.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wizards/com') diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py index 567a1f1ae434..5989158fcbd6 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py @@ -373,7 +373,7 @@ class AgendaDocument(TextDocument): self.teLocation.placeHolderText = self.agenda.cp_Location self.teLocation.write(self.trLocation) else: - raise IllegalArgumentException ("No such title control...") + raise Exception("No such title control...") except Exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py index 36cfbffa41e1..6e269f6bf242 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py @@ -643,7 +643,7 @@ class TopicsControl(ControlScroller): elif tmp_switch_var1 == 3: return cr.timebox else: - raise IllegalArgumentException ("No such column"); + raise Exception("No such column"); '''getControl returns a control out of the given row, which is diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index aa6c059b6e24..cb7c1cebeb33 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -117,7 +117,7 @@ class OfficeDocument(object): xPeer = None try: xPeer = xToolkit.createWindow(aDescriptor) - except IllegalArgumentException: + except Exception: traceback.print_exc() #define some further properties of the frame window diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py index bc63e1a9ae1c..e8d649a31462 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -96,7 +96,7 @@ class TextSectionHandler(object): xSecondTextCursor = self.xText.createTextCursor() xSecondTextCursor.gotoEnd(False) insertTextSection(GroupName, TemplateName, xSecondTextCursor) - except IllegalArgumentException: + except Exception: traceback.print_exc() def insertTextSection(self, sectionName, templateName, position): diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index ef227235677b..37376f1eec45 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -213,7 +213,7 @@ class UnoDialog(object): nUIColor = 0 try: nUIColor = self.xVclWindowPeer.getProperty("DisplayBackgroundColor") - except IllegalArgumentException: + except Exception: traceback.print_exc() return False -- cgit