Tuesday, December 13, 2011

compiling about try catch block

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

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate