29 lines
913 B
Text
29 lines
913 B
Text
|
|
/* NetRexx */
|
||
|
|
options replace format comments java crossref symbols nobinary
|
||
|
|
|
||
|
|
-- =============================================================================
|
||
|
|
class RExceptions public
|
||
|
|
|
||
|
|
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
method test() public signals RExceptions.TakeException
|
||
|
|
if (1 == 1) then signal RExceptions.TakeException()
|
||
|
|
return
|
||
|
|
|
||
|
|
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
method main(args = String[]) public static
|
||
|
|
do
|
||
|
|
RExceptions().test()
|
||
|
|
catch ex = Exception
|
||
|
|
say ex.toString()
|
||
|
|
end
|
||
|
|
|
||
|
|
return;
|
||
|
|
|
||
|
|
-- =============================================================================
|
||
|
|
class RExceptions.TakeException public extends Exception
|
||
|
|
|
||
|
|
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
method TakeException() public
|
||
|
|
super('I resent that!')
|
||
|
|
return
|