Class Throwable

Информация

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

Подробнее...

Подробное описание

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.

Пример
Class MyThrowable Extends Throwable 
 
    Field msg:String 
     
    Method Newmsg: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