Source code for bitsharesapi.exceptions

# -*- coding: utf-8 -*-
import re

from grapheneapi.exceptions import RPCError

[docs]def decodeRPCErrorMsg(e): """Helper function to decode the raised Exception and give it a python Exception class.""" found = ( "(10 assert_exception: Assert Exception\n|" "3030000 tx_missing_posting_auth)" ".*: (.*)\n" ), str(e), flags=re.M, ) if found: return else: return str(e)
[docs]class MissingRequiredActiveAuthority(RPCError): pass
[docs]class NoMethodWithName(RPCError): pass
[docs]class UnhandledRPCError(RPCError): pass
[docs]class NumRetriesReached(Exception): pass
[docs]class InvalidEndpointUrl(Exception): pass
[docs]class AccountCouldntBeFoundException(Exception): pass
[docs]class InvalidAccountNameException(Exception): pass
[docs]class UnknownNetworkException(Exception): """Thrown when we don't recognize the chain id.""" pass