OLD | NEW |
1 var try_catch = dart.defineLibrary(try_catch, {}); | 1 var try_catch = dart.defineLibrary(try_catch, {}); |
2 var core = dart.import(core); | 2 var core = dart.import(core); |
3 (function(exports, core) { | 3 (function(exports, core) { |
4 'use strict'; | 4 'use strict'; |
5 // Function foo: () → dynamic | 5 // Function foo: () → dynamic |
6 function foo() { | 6 function foo() { |
7 try { | 7 try { |
8 throw "hi there"; | 8 throw "hi there"; |
9 } catch (e$) { | 9 } catch (e$) { |
10 if (dart.is(e$, core.String)) { | 10 if (dart.is(e$, core.String)) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 throw e; | 46 throw e; |
47 } else | 47 } else |
48 throw e; | 48 throw e; |
49 } | 49 } |
50 | 50 |
51 } | 51 } |
52 // Function wub: () → dynamic | 52 // Function wub: () → dynamic |
53 function wub() { | 53 function wub() { |
54 try { | 54 try { |
55 throw "on without exception parameter"; | 55 throw "on without exception parameter"; |
56 } catch (e$) { | 56 } catch (e) { |
57 if (dart.is(e$, core.String)) { | 57 if (dart.is(e, core.String)) { |
58 } else | 58 } else |
59 throw e$; | 59 throw e; |
60 } | 60 } |
61 | 61 |
62 } | 62 } |
63 // Function main: () → dynamic | 63 // Function main: () → dynamic |
64 function main() { | 64 function main() { |
65 foo(); | 65 foo(); |
66 bar(); | 66 bar(); |
67 baz(); | 67 baz(); |
68 qux(); | 68 qux(); |
69 wub(); | 69 wub(); |
70 } | 70 } |
71 // Exports: | 71 // Exports: |
72 exports.foo = foo; | 72 exports.foo = foo; |
73 exports.bar = bar; | 73 exports.bar = bar; |
74 exports.baz = baz; | 74 exports.baz = baz; |
75 exports.qux = qux; | 75 exports.qux = qux; |
76 exports.wub = wub; | 76 exports.wub = wub; |
77 exports.main = main; | 77 exports.main = main; |
78 })(try_catch, core); | 78 })(try_catch, core); |
OLD | NEW |