Open joefresna opened 5 years ago
Created branch for this, named clean-exceptions
.
The commit https://github.com/DiODeProject/MuMoT/commit/f1d090ba1ef40357fddcd4114a26c66b9b3601b6 of that branch cleaned the part of stochastic analysis.
Other views and models have still some print()
(quoted from #318)
I changed my old print("Warning message") with raise exceptions.MuMoTWarning("Warning message") (as indicated in #352), however this stops the program. Instead, the desired behaviour is to let it keep running and just print the warning message. How shall I do that? Do you know, @jarmarshall ?
I think you can use warn()
from the warnings
module...
PS some warnings should go to the log, some should probably be displayed. Most probably should go to the log - so need to pay attention to this...
Exceptions, such as warnings and errors, are sometimes raised with a
print("Warning message")
. They should instead be raised withraise exceptions.MuMoTWarning("Warning message")