0

ZK Error Handling

asked 2013-05-08 08:47:12 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Hi

I followed this link and i used in my project. And also i am finding way to print complete stack track as explained here.

Is that possible to print the complete stack trace in the error.zul file.

delete flag offensive retag edit

Comments

Any help to convert the above code in MVC or MVVM without zscript ?

Senthilchettyin ( 2013-05-15 12:43:53 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-05-10 13:32:53 +0800

ryg78 gravatar image ryg78
29 2

Hi,

Showing complete error in UI IMHO is not a good idea actually. But it can be useful during dev. Try to add these lines in error.zul. <textbox value="" id="txtError" cols="140" rows="10"/>

<zscript>
import java.io.PrintWriter;
import java.io.StringWriter;

Exception ex = requestScope.get("javax.servlet.error.exception");
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
ex.printStackTrace(pw);

txtError.setValue(sw.toString());
</zscript>

Regards, Henry Girsang

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-05-08 08:47:12 +0800

Seen: 51 times

Last updated: May 15 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More