File: exceptions2.bsh

package info (click to toggle)
bsh 2.0b4-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 4,072 kB
  • ctags: 3,680
  • sloc: java: 23,424; xml: 4,484; sh: 134; makefile: 21
file content (12 lines) | stat: -rw-r--r-- 235 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

// Match untyped exception param
try { throw new Exception(); } 
catch ( ArithmeticException e ) { assert(false); } 
catch ( e ) { flag(); }

assert( flag() == 1 );

complete();