Add support for throw statement which can be used to throw
exceptions. Not very useful until we have a try exception which can
catch them.
throw statement can be used to throw new exceptions or previouly
caught exceptions. Only objects which are instance of Exception
class can be thrown, otherwise an TypeError is thrown.
Add support for Interpreter class to track caught exceptions,
alongside with uncaught exceptions. Required for throw statement.
Fix minor yet annoying bugs where the number of required arguments
was not properly converted to string in error messages.
Add support for
throw
statement which can be used to throw exceptions. Not very useful until we have atry
exception which can catch them.throw
statement can be used to throw new exceptions or previouly caught exceptions. Only objects which are instance ofException
class can be thrown, otherwise anTypeError
is thrown.Interpreter
class to track caught exceptions, alongside with uncaught exceptions. Required forthrow
statement.