def _sdp_checkraise (code):
    if code == _widcomm.SDP_OK: return
    elif code == _widcomm.SDP_COULD_NOT_ADD_RECORD:
        raise BluetoothError ("Could not add SDP record")
    elif code == _widcomm.SDP_INVALID_RECORD:
        raise BluetoothError ("Invalid SDP record")
    elif code == _widcomm.SDP_INVALID_PARAMETERS:
        raise BluetoothError ("SDP: invalid parameters")
    raise RuntimeError ("unknown SDP status code %s" % code)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/pybluez/bluetooth/widcomm.py/_sdp_checkraise/original