File: exceptions2.bsh

package info (click to toggle)
bsh 1.1alpha5-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 2,336 kB
  • ctags: 2,083
  • sloc: java: 16,095; makefile: 134; sh: 51
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();