Often times, though, if you want to throw an exception, you will want to use
Exception subclass, so you can identify the type of exception
Exception is an ordinary class. You can create subclasses and throw instances
of them, instead of throwing instances of
Exception, as you see fit.
You can learn more about this in: