This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 27, 2011, 4:05 PM
66 Posts

Display XPages Runtime Error Message(s) on my own created XPage?

  • Category: Other
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
 So I know I can get the stack trace info, but what I am wanting to do is get the information that is displayed when "Display XPages runtime error page" is checked (shown below) in my own created XPage. Does anyone know if this is possible?
 

Error source

Page Name: ______
Control Id: ______
Property: ______

Exception

 Error while executing JavaScript action expression
Script interpreter error, line=1, col=17: 
Jul 27, 2011, 7:22 PM
122 Posts
Re: Display XPages Runtime Error Message(s) on my own created XPage?
If you use a Computed Field mapped to requestScope.error, that will get the relevant error message. I can't remember if it includes the stack trace, I think not. Is that what you want?
Jul 27, 2011, 8:34 PM
66 Posts
Re: Display XPages Runtime Error Message(s) on my own created XPage?
value="#{requestScope.error}" will only get you something that looks like this: "com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression"
 
I've found a way to get the "Control" with:
 
//code for control (button click etc.)
if(error instanceof com.ibm.xsp.exception.XSPExceptionInfo === false) {
var msg = requestScope.error.getCause();
return msg.getErrorComponentId();
}
//code for event (onClientLoad etc.)
else if (error instanceof com.ibm.xsp.exception.XSPExceptionInfo === true) {
return error.getErrorComponentId();
else {
""
}
 
I'm not sure how to get the "Page Name" the error occurred on yet, or how to display JavaScript code (where it highlights in red where it thinks the code erred at) 
Jul 28, 2011, 1:40 PM
66 Posts
Re: Display XPages Runtime Error Message(s) on my own created XPage?
 Here is my code for a custom error page so far: http://dl.dropbox.com/u/40159/xpErrorPage.txt

I have everything I want besides where the error happened at and the (X)page name of the error. If anyone knows how to get either of these things on a custom error page please share!

 
picture of error page:  http://dl.dropbox.com/u/40159/ErrorPic.png

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal