Move error enum to ErrorType

And add analogous error objects to Error
Use premade Error objects
Add Error.maybe_raise()
Use Error.maybe_raise instead of manually checking error values