Changes between Version 1 and Version 2 of Throw
- Timestamp:
- 11/22/10 20:25:03 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Throw
v1 v2 5 5 The thrown exception is an object whose class is derived from System.Exception, for example: 6 6 {{{ 7 #!cobra 7 8 class MyException inherits System.Exception 8 9 pass … … 15 16 You can also rethrow a caught exception using the throw statement by specifying the caught exception 16 17 {{{ 18 #!cobra 17 19 catch exc as MyException 18 20 if passOn … … 28 30 == Example == 29 31 {{{ 32 #!cobra 30 33 class ThrowTest 31 34 def getNumber(index as int) as int