I am using asp.net and I am always struggling for a neat way to handle errors and if there are any, to pass the errormessage to the user. For example, I have an User class,
If you don't want to use the usual try/catch and display error divs in the catch then there is a Page.Error event which you could use to catch handle errors with the context of your page. Within that you would call Server.GetLastError() to get the last exception thrown and then inform the user something went wrong by directing them to an error page, or by showing/hiding error elements on your page.