Added a method to easily exit the application  with an Exception