Attach return_code to ErrorReturnCode

All exceptions should have an integer return code available on the
exception object. Otherwise, users must parse the name of the exception
class to retrieve this data.