OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/throw6_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__throw6_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const throw6_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 throw6_test.MyException1 = class MyException1 extends core.Object { |
| 13 new(message) { |
| 14 if (message === void 0) message = "1"; |
| 15 this.message_ = message; |
| 16 } |
| 17 }; |
| 18 dart.setSignature(throw6_test.MyException1, { |
| 19 constructors: () => ({new: dart.definiteFunctionType(throw6_test.MyException
1, [], [core.String])}) |
| 20 }); |
| 21 throw6_test.Helper = class Helper extends core.Object { |
| 22 new() { |
| 23 this.i = 0; |
| 24 } |
| 25 f1() { |
| 26 let j = 0; |
| 27 try { |
| 28 j = this.func(); |
| 29 } catch (exception) { |
| 30 this.i = dart.notNull(this.i) + 100; |
| 31 core.print(dart.dload(exception, 'message_')); |
| 32 } |
| 33 finally { |
| 34 this.i = dart.notNull(this.i) + 1000; |
| 35 } |
| 36 return this.i; |
| 37 } |
| 38 func() { |
| 39 this.i = 0; |
| 40 try { |
| 41 while (dart.notNull(this.i) < 10) { |
| 42 this.i = dart.notNull(this.i) + 1; |
| 43 } |
| 44 if (dart.notNull(this.i) > 0) { |
| 45 dart.throw(new throw6_test.MyException1("Test for MyException1 being t
hrown")); |
| 46 } |
| 47 } finally { |
| 48 this.i = 800; |
| 49 } |
| 50 return this.i; |
| 51 } |
| 52 }; |
| 53 dart.setSignature(throw6_test.Helper, { |
| 54 constructors: () => ({new: dart.definiteFunctionType(throw6_test.Helper, [])
}), |
| 55 methods: () => ({ |
| 56 f1: dart.definiteFunctionType(core.int, []), |
| 57 func: dart.definiteFunctionType(core.int, []) |
| 58 }) |
| 59 }); |
| 60 throw6_test.Throw6Test = class Throw6Test extends core.Object { |
| 61 static testMain() { |
| 62 expect$.Expect.equals(1900, new throw6_test.Helper().f1()); |
| 63 } |
| 64 }; |
| 65 dart.setSignature(throw6_test.Throw6Test, { |
| 66 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 67 names: ['testMain'] |
| 68 }); |
| 69 throw6_test.main = function() { |
| 70 throw6_test.Throw6Test.testMain(); |
| 71 }; |
| 72 dart.fn(throw6_test.main, VoidTodynamic()); |
| 73 // Exports: |
| 74 exports.throw6_test = throw6_test; |
| 75 }); |
OLD | NEW |