Cerberus X Documentation

Class Throwable

The Throwable class must be extended by all classes that are intended to be used with Throw. More...

Declarations

Extended By
JsonError , StreamError
Please note that only documented classes are listed here, there might be undocumented classes that extend this one.

Detailed Discussion

The Throwable class must be extended by all classes that are intended to be used with Throw.

The Throwable class currently has no members.

Any attempt to throw an object that doesn't extend Throwable will result in a compile time error.

Example
Class MyThrowable Extends Throwable

Field msg:String

Method New( msg:String )
Self.msg=msg
End
End

Function Test:Void()
Throw New MyThrowable( "Thrown!" )
End

Function Main()
Try
Test
Catch t:MyThrowable
Print "MyThrowable thrown: msg="+t.msg
End
End