changeset 348 | efd32656acce |
parent 347 | 618883cca24a |
child 350 | c07abe14c188 |
347:618883cca24a | 348:efd32656acce |
---|---|
3932 self run:#testTryCatch04b |
3932 self run:#testTryCatch04b |
3933 self new testTryCatch04b |
3933 self new testTryCatch04b |
3934 " |
3934 " |
3935 ! |
3935 ! |
3936 |
3936 |
3937 testTryCatchFinally01 |
|
3938 self |
|
3939 execute:'test(arg) { |
|
3940 var handlerWasCalled = false; |
|
3941 var finallyExecuted = false; |
|
3942 |
|
3943 function failingMethod() { return 10 / arg; }; |
|
3944 function exceptionRaised() { handlerWasCalled = true; }; |
|
3945 |
|
3946 try { |
|
3947 failingMethod(); |
|
3948 } catch (Error e) { |
|
3949 exceptionRaised(e); |
|
3950 } finally { |
|
3951 finallyExecuted = true; |
|
3952 } |
|
3953 return handlerWasCalled && finallyExecuted; |
|
3954 }' |
|
3955 for:nil |
|
3956 arguments:#(0) |
|
3957 expect:true |
|
3958 |
|
3959 " |
|
3960 self run:#testTryCatchFinally01 |
|
3961 self new testTryCatchFinally01 |
|
3962 " |
|
3963 ! |
|
3964 |
|
3937 testTryFinally01 |
3965 testTryFinally01 |
3938 self |
3966 self |
3939 execute:'test(arg) { |
3967 execute:'test(arg) { |
3940 var handlerWasCalled = false; |
3968 var handlerWasCalled = false; |
3941 |
3969 |