Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean exceptions #352

Open
joefresna opened this issue Sep 27, 2019 · 3 comments
Open

Clean exceptions #352

joefresna opened this issue Sep 27, 2019 · 3 comments

Comments

@joefresna
Copy link
Contributor

Exceptions, such as warnings and errors, are sometimes raised with a print("Warning message"). They should instead be raised with raise exceptions.MuMoTWarning("Warning message")

@joefresna
Copy link
Contributor Author

joefresna commented Sep 27, 2019

Created branch for this, named clean-exceptions.
The commit f1d090b of that branch cleaned the part of stochastic analysis.
Other views and models have still some print()

@jarmarshall
Copy link
Contributor

(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...

@jarmarshall
Copy link
Contributor

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants