Show error reason

If debug mode is off, the page displayed is not very precise. I added an option to show the exception value and type.