summaryrefslogtreecommitdiff
path: root/shared-bindings/_bleio/__init__.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/_bleio/__init__.c')
-rw-r--r--shared-bindings/_bleio/__init__.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/shared-bindings/_bleio/__init__.c b/shared-bindings/_bleio/__init__.c
index 8778e94ed..4aeb7b460 100644
--- a/shared-bindings/_bleio/__init__.c
+++ b/shared-bindings/_bleio/__init__.c
@@ -59,10 +59,9 @@
//|
-//| class BluetoothError:
-//| def __init__(self, Exception: Exception):
-//| """Catch all exception for Bluetooth related errors."""
-//| ...
+//| class BluetoothError(Exception):
+//| """Catch all exception for Bluetooth related errors."""
+//| ...
MP_DEFINE_BLEIO_EXCEPTION(BluetoothError, Exception)
NORETURN void mp_raise_bleio_BluetoothError(const compressed_string_t* fmt, ...) {
@@ -72,10 +71,9 @@ NORETURN void mp_raise_bleio_BluetoothError(const compressed_string_t* fmt, ...)
va_end(argptr);
nlr_raise(exception);
}
-//| class ConnectionError:
-//| def __init__(self, BluetoothError: _bleio.BluetoothError):
-//| """Raised when a connection is unavailable."""
-//| ...
+//| class ConnectionError(BluetoothError):
+//| """Raised when a connection is unavailable."""
+//| ...
//|
MP_DEFINE_BLEIO_EXCEPTION(ConnectionError, bleio_BluetoothError)
NORETURN void mp_raise_bleio_ConnectionError(const compressed_string_t* fmt, ...) {
@@ -86,20 +84,18 @@ NORETURN void mp_raise_bleio_ConnectionError(const compressed_string_t* fmt, ...
nlr_raise(exception);
}
-//| class RoleError:
-//| def __init__(self, BluetoothError: _bleio.BluetoothError):
-//| """Raised when a resource is used as the mismatched role. For example, if a local CCCD is
-//| attempted to be set but they can only be set when remote."""
-//| ...
+//| class RoleError(BluetoothError):
+//| """Raised when a resource is used as the mismatched role. For example, if a local CCCD is
+//| attempted to be set but they can only be set when remote."""
+//| ...
//|
MP_DEFINE_BLEIO_EXCEPTION(RoleError, bleio_BluetoothError)
NORETURN void mp_raise_bleio_RoleError(const compressed_string_t* msg) {
mp_raise_msg(&mp_type_bleio_RoleError, msg);
}
-//| class SecurityError:
-//| def __init__(self, BluetoothError: _bleio.BluetoothError):
-//| """Raised when a security related error occurs."""
-//| ...
+//| class SecurityError(BluetoothError):
+//| """Raised when a security related error occurs."""
+//| ...
//|
MP_DEFINE_BLEIO_EXCEPTION(SecurityError, bleio_BluetoothError)
NORETURN void mp_raise_bleio_SecurityError(const compressed_string_t* fmt, ...) {