Over the course of the series we have been
that we are familiar with in LotusScript and Formula language but we have
had to make some subtle changes so that it would fit within the conventions
When developing your XPage application
you may have come across ‘Error 500’ in your web browser, how it appears
to you depends on the web browser you are using.
The normal cause of this error is a
error message above doesn’t really help you beyond knowing the fact that
there was an error.
If you look at the application properties
for your database there is a section for errors and timeouts in the xpages
tab. Turn on the ‘Display default error page’ option.
Now if you save the application properties
and refresh your XPage that was giving you the error you should see a much
more helpful error page :
It’s still not perfect, the page name
above is not exactly where the error is. In this case I purposely caused
my error in the content_HomePage custom control but the rest of the error
message really does help me pinpoint exactly where the error occurred and
knowing what line of code caused the error can help you fix it quickly.
In this case I used GetColumnValue instead of getColumnValue.
Once your finished your XPages application
you may want to turn that application property back off incase a user causes
some sort of error. I don’t know about you but I’d rather my users didn’t
see such detailed error messages. I’d prefer to keep it nice and simple
for them and the XPages processor allows us to do that also.
Back in the application properties you
can select an XPage to be displayed if there is an error. This could be
a simple ‘An Error Has Occurred, Click here to return to the homepage’
type XPage or you could have a form asking the user to enter in what they
were doing and then you can email that to the application developer. The
options are limitless. here’s an option where I redirect to a debug xpage.
My debug page shows me the values of
all the session and application scope variables at the time of the error
and the page will be included in the next downloadable version of the database.