@@ -286,7 +286,7 @@ def _run_cmd(self, cmd: list, timeout: Optional[int] = None):
286
286
# set the process environment from the generated .bat file in windows which should have all the dependencies
287
287
batFilePath = pathlib .Path (self .tempdir ) / f"{ self .modelName } .bat"
288
288
if not batFilePath .exists ():
289
- ModelicaSystemError ("Batch file (*.bat) does not exist " + str (batFilePath ))
289
+ raise ModelicaSystemError ("Batch file (*.bat) does not exist " + str (batFilePath ))
290
290
291
291
with open (batFilePath , 'r' ) as file :
292
292
for line in file :
@@ -351,7 +351,7 @@ def requestApi(self, apiName, entity=None, properties=None): # 2
351
351
352
352
def xmlparse (self ):
353
353
if not self .xmlFile .exists ():
354
- ModelicaSystemError (f"XML file not generated: { self .xmlFile } " )
354
+ raise ModelicaSystemError (f"XML file not generated: { self .xmlFile } " )
355
355
356
356
tree = ET .parse (self .xmlFile )
357
357
rootCQ = tree .getroot ()
@@ -907,11 +907,11 @@ def checkValidInputs(self, name):
907
907
if isinstance (l , tuple ):
908
908
# if l[0] < float(self.simValuesList[0]):
909
909
if l [0 ] < float (self .simulateOptions ["startTime" ]):
910
- ModelicaSystemError ('Input time value is less than simulation startTime' )
910
+ raise ModelicaSystemError ('Input time value is less than simulation startTime' )
911
911
if len (l ) != 2 :
912
- ModelicaSystemError (f'Value for { l } is in incorrect format!' )
912
+ raise ModelicaSystemError (f'Value for { l } is in incorrect format!' )
913
913
else :
914
- ModelicaSystemError ('Error!!! Value must be in tuple format' )
914
+ raise ModelicaSystemError ('Error!!! Value must be in tuple format' )
915
915
916
916
def createCSVData (self ) -> pathlib .Path :
917
917
start_time : float = float (self .simulateOptions ["startTime" ])
0 commit comments