From c1fb74d488b5b5edd711551528531dbd30c2c602 Mon Sep 17 00:00:00 2001 From: Prasasto Adi Date: Sun, 13 Nov 2016 23:23:07 +0700 Subject: [PATCH] Add Error Reporting --- Orange/widgets/classify/owloadclassifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Orange/widgets/classify/owloadclassifier.py b/Orange/widgets/classify/owloadclassifier.py index 6b151a0807e..140ace69bfd 100644 --- a/Orange/widgets/classify/owloadclassifier.py +++ b/Orange/widgets/classify/owloadclassifier.py @@ -97,9 +97,9 @@ def load(self, filename): try: classifier = pickle.load(open(filename, "rb")) except pickle.UnpicklingError: - raise # TODO: error reporting + raise pickle.UnpicklingError("Failed to load '{}'.".format(filename)) except os.error: - raise # TODO: error reporting + raise OSError("Failed to load '{}'.".format(filename)) else: self._remember(filename) self.send("Classifier", classifier)