Changed the way the error works: its interface now, so one can create cu...

...stom errors in a more elegant way