pymech
pymech copied to clipboard
Explicit errors and fail quickly
This is not a good pattern to have. @guillaumechauvat had mentioned this before.
logger.error(...)
return 1
Rather than use C / Fortran style integer return, we should raise an error to avoid confusing error messages. This however might break some compatibility in user code, because someone might be not catching the errors as they should.
We can also have a PymechError custom exception if it helps.