Skip to content

Commit 3ce750d

Browse files
committed
[OMCSessionException] add exception handling for OMCSession*
1 parent 5b21a06 commit 3ce750d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

OMPython/OMCSession.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def wait(self, timeout):
7575
return self.process.wait(timeout=timeout)
7676

7777

78+
class OMCSessionException(Exception):
79+
pass
80+
81+
7882
class OMCSessionBase(metaclass=abc.ABCMeta):
7983

8084
def __init__(self, readonly=False):

OMPython/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
CONDITIONS OF OSMC-PL.
3737
"""
3838

39-
from OMPython.OMCSession import OMCSessionBase, OMCSessionZMQ
39+
from OMPython.OMCSession import OMCSessionBase, OMCSessionZMQ, OMCSessionException
4040
from OMPython.ModelicaSystem import ModelicaSystem, ModelicaSystemError, LinearizationResult
4141

4242
# global names imported if import 'from OMPython import *' is used
@@ -45,6 +45,7 @@
4545
'ModelicaSystemError',
4646
'LinearizationResult',
4747

48+
'OMCSessionException',
4849
'OMCSessionZMQ',
4950
'OMCSessionBase',
5051
]

0 commit comments

Comments
 (0)