0
How is a raised exception different from a normal one and why would you use one.
It is unclear how raising an exception is different than a normal exception or why you would use one. More description on the first slide in the section would be nice.
2 Réponses
+ 1
When handling an exception, you can want to refine the problem that occurred. That way, you can tell the user that a specific error occurred, or you do not want the parameters he has given...
+ 1
There are no normal exceptions. All exceptions are raised.
You can raise exceptions by hand to show that something specific to your program went wrong. Like you know, you automatically get exceptions, when you divide by 0, because that is bad input. Maybe there is bad input in your program. Maybe the eat method of your tiger class should never receive lemonade.