Fix service area case
This commit is contained in:
@@ -33,7 +33,7 @@ class Output:
|
||||
|
||||
|
||||
def _check(self, result):
|
||||
if result != 0:
|
||||
if result != 0 and result != 10:
|
||||
msg = ctypes.c_char_p()
|
||||
code = self._lib.ENR_checkError(self._handle, ctypes.byref(msg))
|
||||
assert code == result
|
||||
|
||||
@@ -2,6 +2,9 @@ ERROR_CODE = {}
|
||||
|
||||
# EPANET 2 Error Messages
|
||||
ERROR_CODE['0'] = "ok"
|
||||
|
||||
ERROR_CODE['10'] = "Warning: model run issued warnings"
|
||||
|
||||
ERROR_CODE['101'] = "insufficient memory available"
|
||||
ERROR_CODE['102'] = "no network data available"
|
||||
ERROR_CODE['103'] = "hydraulic solver not opened"
|
||||
@@ -74,4 +77,16 @@ ERROR_CODE['305'] = "cannot open hydraulics file"
|
||||
ERROR_CODE['306'] = "hydraulics file does not match network data"
|
||||
ERROR_CODE['307'] = "cannot read hydraulics file"
|
||||
ERROR_CODE['308'] = "cannot save results to file"
|
||||
ERROR_CODE['309'] = "cannot save results to report file"
|
||||
ERROR_CODE['309'] = "cannot save results to report file"
|
||||
|
||||
ERROR_CODE['411'] = "Input Error 411: no memory allocated for results"
|
||||
ERROR_CODE['412'] = "Input Error 412: binary file hasn't been opened"
|
||||
ERROR_CODE['421'] = "Input Error 421: invalid parameter code"
|
||||
ERROR_CODE['422'] = "Input Error 422: reporting period index out of range"
|
||||
ERROR_CODE['423'] = "Input Error 423: element index out of range"
|
||||
|
||||
ERROR_CODE['434'] = "File Error 434: unable to open binary file"
|
||||
ERROR_CODE['435'] = "File Error 435: invalid binary file type"
|
||||
ERROR_CODE['436'] = "File Error 436: no results in binary file"
|
||||
|
||||
ERROR_CODE['ERR'] = "Error: An unknown error has occurred"
|
||||
|
||||
Reference in New Issue
Block a user