1 2 3 4 5 6 7 8 9 10 11
TryInWhile( new TryObject( "hello", ThrowException, true ) ); function TryObject( value, throwFunction, result ) { this.thrower=throwFunction } function ThrowException() TryInWhile(1); function TryInWhile( object ) { try { object.thrower() } catch ( e ) { } }