Exceptions | SoloLearn: Learn to code for FREE!



How can I get to know the situation of need of exception in my code

1/30/2018 2:03:56 PM

Sachin R

3 Answers

New Answer


https://www.sololearn.com/discuss/588273/?ref=app https://www.sololearn.com/discuss/328692/?ref=app https://www.sololearn.com/discuss/106948/?ref=app


The language matters for this. Java generates a compile error, if you need one and fail to provide it for throws. But, things like divide by 0 you must read code. C++ doesn't care so you must read the documentation of library functions or code to figure it out. I haven't done enough Python to know, but it's looking a lot like C++ so far and based on the fact it is interpreted I expect it will continue to be that way.