124578dca10a295319b18c97d4f0002e0262ac66
[platform/framework/web/crosswalk-tizen.git] /
1 try{foo()}   catch (e){  log(e)
2 }
3
4 try
5 {
6 // foo comment
7         foo();
8 }
9 finally
10 {
11                 // bar comment
12             bar();
13             }
14
15 try{foo()}   catch (e){  log(e)
16                       } finally {
17                         bar()
18          }
19
20 try {
21    bar( "foo" );
22 } catch ( e ) {
23     // Empty Catch comment
24 }
25
26
27 // issue #35: "catch" block indent + empty catch body
28 jQuery.ready.promise = function( obj ) {
29     try {
30         top = window.frameElement == null && document.documentElement;
31     } catch(e) {}
32 };
33
34 // "catch" brace indent
35 function issueNN( obj ) {
36     try {
37         x = y;
38     } catch (e) {
39         console.log(e);
40     }
41 }
42
43 // "finally" brace indent
44 function foo(obj) {
45     try {
46         top = window.frameElement == null && document.documentElement;
47     } catch (e) {
48         console.log(e);
49     } finally {
50         // finally a comment
51         top = 0;
52         // weird
53     }
54 }
55
56 jQuery.ready.promise = function( obj ) {
57 try{
58 // try 2
59 top = window.frameElement == null && document.documentElement;
60 // try after 2
61 }catch(e){
62 // catch 2
63 console.log(e);
64 // catch after 2
65 }finally{
66 // finally a comment 2
67 top = 0;
68 // finally after 2
69 }
70 };
71
72 // nested try-catch
73 function nestedTryCatch() {
74     try{
75         normalPath();
76     }catch(e) {
77         try {
78             // try
79             alternatePath();
80             // just a little bit harder
81         } catch(e){
82             // catch
83             console.log(e);
84             // if you can
85         }finally{}
86     }finally{ shouldBreak = true; } next();
87 }
88
89 // line break handling (#128)
90 try {
91   doStuff()
92 }
93 catch
94   (e)
95 {
96   yesThisIsWeird()
97 }