November 2001
Beginner
320 pages
5h 53m
English
You can manually raise an exception by using the raise statement. This accepts at least one argument, the name of the exception you want to use, with any additional arguments acting as additional data to the exception. For example:
raise TypeError, 'The type is not supported here'
This is syntactically equivalent to calling die() in Perl within an eval statement.