Added a general error class