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
|
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.
ExampleClass
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