From d26202c40267061d7c259f7ac1f172f8dba8ff84 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 8 Aug 2017 14:33:45 +0200 Subject: [PATCH] Base class for storm exceptions --- lib/stormpy/__init__.py | 1 + lib/stormpy/exceptions/__init__.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 lib/stormpy/exceptions/__init__.py diff --git a/lib/stormpy/__init__.py b/lib/stormpy/__init__.py index 5c6d212..db9282d 100644 --- a/lib/stormpy/__init__.py +++ b/lib/stormpy/__init__.py @@ -4,6 +4,7 @@ from . import storage from .storage import * from ._config import * from .logic import * +from .exceptions import * from pycarl import Variable # needed for building parametric models diff --git a/lib/stormpy/exceptions/__init__.py b/lib/stormpy/exceptions/__init__.py new file mode 100644 index 0000000..eb6d32b --- /dev/null +++ b/lib/stormpy/exceptions/__init__.py @@ -0,0 +1,11 @@ +class StormError(Exception): + """ + Base class for exceptions in Storm. + """ + + def __init__(self, message): + """ + Constructor. + :param message: Error message. + """ + self.message = "Storm: " + message