Create the new error class 

The error class will be rewritten to provide better error handling