compiling about try catch block

13 views
Skip to first unread message

wahaha

unread,
Dec 13, 2011, 8:43:24 PM12/13/11
to Google Web Toolkit
i write a try catch block in my java code,but i found that in some
situation the catch part will not take effect after been compiled to
javascript,and in some situation do.
i wondered why?
for example:
/////////////////////////////////////////////
try{
if(){
// do sth.
}
}
} catch (Exception e) {
// do sth2;
}
/////////////////////////////////////////////

do sth2 will not work,then i modified it to :

/////////////////////////////////////////////
try{
if(){
// do sth.
}
else{
// do another thing;
}
}
} catch (Exception e) {
// do sth2;
}
/////////////////////////////////////////////

now it works

-sowdri-

unread,
Dec 14, 2011, 12:14:32 AM12/14/11
to google-we...@googlegroups.com
Could you paste the actual code?
Reply all
Reply to author
Forward
0 new messages