Added error message class and very general exception handler