Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific.
# language governing permissions and limitations under the License.
""" :mod:`pyrfc`-specific exception classes
"""
class RFCError(Exception):
""" Exception base class
Indicates that there was an error in the Python connector.
"""
pass
class RFCLibError(RFCError):
""" RFC library error
Base class for exceptions raised by the local underlying C connector (sapnwrfc.c).
"""
# Results as of: RfcGetRcAsString(RFC_RC rc)
# cf. material/kjona_getRcAsString
code2txt = {
0: u'RFC_OK',
1: u'RFC_COMMUNICATION_FAILURE',
2: u'RFC_LOGON_FAILURE',
3: u'RFC_ABAP_RUNTIME_FAILURE',
4: u'RFC_ABAP_MESSAGE',
5: u'RFC_ABAP_EXCEPTION',
6: u'RFC_CLOSED',
7: u'RFC_CANCELED',