Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How do we extract the HTTPError message?


Go to End


854 Views

Avatar
HansR

Community Member, 141 Posts

11 July 2011 at 5:50pm

The HTTPError class' constructor includes a message parameter for providing additional information about what went wrong. However, this doesn't get displayed in the error page. Is there any method of including it on the error page? Failing that, is there any way to log those messages?

My preference would be to show it on the error page so that the user has a bit more information as to what went wrong. For example, if a user entered a URL with the wrong ID, the message would state: "That item does not exist."

Hans