How to use the pyrfc._exception.RFCLibError function in pyrfc

To help you get started, we’ve selected a few pyrfc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / PyRFC / pyrfc / _exception.py View on Github external
self.msg_type = msg_type
        self.msg_number = msg_number
        self.msg_v1 = msg_v1
        self.msg_v2 = msg_v2
        self.msg_v3 = msg_v3
        self.msg_v4 = msg_v4

    def __str__(self):
        return '{} (rc={}): key={}, message={} [MSG: class={}, type={}, number={}, v1-4:={};{};{};{}]'.format(
            self.code2txt.get(self.code, u'???'),
            self.code, self.key, self.message, self.msg_class,
            self.msg_type, self.msg_number,
            self.msg_v1, self.msg_v2, self.msg_v3, self.msg_v4
            )

class ABAPApplicationError(RFCLibError):
    """ ABAP application error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    ABAP_APPLICATION_FAILURE.
    """
    pass


class ABAPRuntimeError(RFCLibError):
    """ ABAP runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    ABAP_RUNTIME_FAILURE.
    """
github SAP / PyRFC / pyrfc / _exception.py View on Github external
def __init__(self, message=None, code=None, key=None,
                 msg_class=None, msg_type=None, msg_number=None,
                 msg_v1=None, msg_v2=None, msg_v3=None, msg_v4=None):
        super(RFCLibError, self).__init__(message)
        self.message = message # Exception.message removed in Py3
        self.code = code
        self.key = key
        self.msg_class = msg_class
        self.msg_type = msg_type
        self.msg_number = msg_number
        self.msg_v1 = msg_v1
        self.msg_v2 = msg_v2
        self.msg_v3 = msg_v3
        self.msg_v4 = msg_v4
github SAP / PyRFC / pyrfc / _exception.py View on Github external
This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    COMMUNICATION_FAILURE.
    """
    pass

class ExternalRuntimeError(RFCLibError):
    """ External runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_RUNTIME_FAILURE.
    """
    pass

class ExternalApplicationError(RFCLibError):
    """ External application error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_APPLICATION_FAILURE.
    """
    pass

class ExternalAuthorizationError(RFCLibError):
    """ External authorization error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_AUTHORIZATION_FAILURE.
    """
    pass
github SAP / PyRFC / pyrfc / _exception.py View on Github external
the error object has an RFC_ERROR_GROUP value of
    ABAP_APPLICATION_FAILURE.
    """
    pass


class ABAPRuntimeError(RFCLibError):
    """ ABAP runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    ABAP_RUNTIME_FAILURE.
    """
    pass

class LogonError(RFCLibError):
    """ Logon error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    LOGON_FAILURE.
    """
    def __init__(self, message=None, code=2, key=u'RFC_LOGON_FAILURE',
                 msg_class=None, msg_type=None, msg_number=None,
                 msg_v1=None, msg_v2=None, msg_v3=None, msg_v4=None):
        # Setting default values allows for raising an error with one parameter.
        super(LogonError, self).__init__(message, code, key, msg_class, msg_type, msg_number,
            msg_v1, msg_v2, msg_v3, msg_v4)


class CommunicationError(RFCLibError):
    """ Communication error
github SAP / PyRFC / pyrfc / _exception.py View on Github external
class LogonError(RFCLibError):
    """ Logon error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    LOGON_FAILURE.
    """
    def __init__(self, message=None, code=2, key=u'RFC_LOGON_FAILURE',
                 msg_class=None, msg_type=None, msg_number=None,
                 msg_v1=None, msg_v2=None, msg_v3=None, msg_v4=None):
        # Setting default values allows for raising an error with one parameter.
        super(LogonError, self).__init__(message, code, key, msg_class, msg_type, msg_number,
            msg_v1, msg_v2, msg_v3, msg_v4)


class CommunicationError(RFCLibError):
    """ Communication error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    COMMUNICATION_FAILURE.
    """
    pass

class ExternalRuntimeError(RFCLibError):
    """ External runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_RUNTIME_FAILURE.
    """
    pass
github SAP / PyRFC / pyrfc / _exception.py View on Github external
This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_RUNTIME_FAILURE.
    """
    pass

class ExternalApplicationError(RFCLibError):
    """ External application error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_APPLICATION_FAILURE.
    """
    pass

class ExternalAuthorizationError(RFCLibError):
    """ External authorization error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_AUTHORIZATION_FAILURE.
    """
    pass

github SAP / PyRFC / pyrfc / _exception.py View on Github external
self.code, self.key, self.message, self.msg_class,
            self.msg_type, self.msg_number,
            self.msg_v1, self.msg_v2, self.msg_v3, self.msg_v4
            )

class ABAPApplicationError(RFCLibError):
    """ ABAP application error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    ABAP_APPLICATION_FAILURE.
    """
    pass


class ABAPRuntimeError(RFCLibError):
    """ ABAP runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    ABAP_RUNTIME_FAILURE.
    """
    pass

class LogonError(RFCLibError):
    """ Logon error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    LOGON_FAILURE.
    """
    def __init__(self, message=None, code=2, key=u'RFC_LOGON_FAILURE',
github SAP / PyRFC / pyrfc / _exception.py View on Github external
msg_v1=None, msg_v2=None, msg_v3=None, msg_v4=None):
        # Setting default values allows for raising an error with one parameter.
        super(LogonError, self).__init__(message, code, key, msg_class, msg_type, msg_number,
            msg_v1, msg_v2, msg_v3, msg_v4)


class CommunicationError(RFCLibError):
    """ Communication error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    COMMUNICATION_FAILURE.
    """
    pass

class ExternalRuntimeError(RFCLibError):
    """ External runtime error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_RUNTIME_FAILURE.
    """
    pass

class ExternalApplicationError(RFCLibError):
    """ External application error

    This exception is raised if a RFC call returns an RC code greater than 0 and
    the error object has an RFC_ERROR_GROUP value of
    EXTERNAL_APPLICATION_FAILURE.
    """
    pass