AssertFail type
Example
F box_area(x:Int, y:Int) { assert(x > 0) assert(y > 0) x * y } echo(box_area(5, 10)) # Output: 50 echo(box_area(-5, 10)) # ... Exception of type AssertFail ... # # Note that the following is better than using assert(): # not(x > 0) throws InvalidArgument('x must be greater than zero').set('x', x)
Direct parent types
- Exception
Represents exceptional situaution. All thrown things shouhld inherit Exception. Direct subtypes: 10