Remove semicolon for errors define and export
Use new exceptions and error codes in tests