Skip to content

Commit 1af4b0c

Browse files
committed
[OMCSessionException] add exception handling for OMCSession*
1 parent 0b63a2b commit 1af4b0c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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
@@ -38,7 +38,7 @@
3838

3939
import logging
4040

41-
from OMPython.OMCSession import OMCSessionBase, OMCSessionZMQ
41+
from OMPython.OMCSession import OMCSessionBase, OMCSessionZMQ, OMCSessionException
4242
from OMPython.ModelicaSystem import ModelicaSystem, ModelicaSystemError, LinearizationResult
4343

4444
# Logger Defined
@@ -63,6 +63,7 @@
6363
'ModelicaSystemError',
6464
'LinearizationResult',
6565

66+
'OMCSessionException',
6667
'OMCSessionZMQ',
6768
'OMCSessionBase',
6869
]

0 commit comments

Comments
 (0)