asselapathirana / epanettools

EPANET calling API for python.
Other
16 stars 13 forks source link

The Error functions in epanettools and pdd_class_wrapper don't work has intended #33

Closed gonccalo closed 5 years ago

gonccalo commented 5 years ago

Both these functions use thepdd_wrapper_class.ENgeterror() function to get the error message, but pdd_wrapper_class is a type so we get an AttributeError that is silenced because the Error function is supposed to always raise an Exception and in the case of the function in epanettools there is a try-except block that catches this exception and raises another one.

In here I have 2 new tests that catch these bugs and a possible fix.

asselapathirana commented 5 years ago

Merging the fix. Thank you @gonccalo