6363//| """Catchall exception for Bluetooth related errors."""
6464//| ...
6565MP_DEFINE_BLEIO_EXCEPTION (BluetoothError , Exception )
66-
6766NORETURN void mp_raise_bleio_BluetoothError (const compressed_string_t * fmt , ...) {
6867 va_list argptr ;
6968 va_start (argptr ,fmt );
7069 mp_obj_t exception = mp_obj_new_exception_msg_vlist (& mp_type_bleio_BluetoothError , fmt , argptr );
7170 va_end (argptr );
7271 nlr_raise (exception );
7372}
74- //| class ConnectionError(BluetoothError):
75- //| """Raised when a connection is unavailable."""
76- //| ...
77- //|
78- MP_DEFINE_BLEIO_EXCEPTION (ConnectionError , bleio_BluetoothError )
79- NORETURN void mp_raise_bleio_ConnectionError (const compressed_string_t * fmt , ...) {
80- va_list argptr ;
81- va_start (argptr ,fmt );
82- mp_obj_t exception = mp_obj_new_exception_msg_vlist (& mp_type_bleio_ConnectionError , fmt , argptr );
83- va_end (argptr );
84- nlr_raise (exception );
85- }
8673
8774//| class RoleError(BluetoothError):
8875//| """Raised when a resource is used as the mismatched role. For example, if a local CCCD is
@@ -93,6 +80,7 @@ MP_DEFINE_BLEIO_EXCEPTION(RoleError, bleio_BluetoothError)
9380NORETURN void mp_raise_bleio_RoleError (const compressed_string_t * msg ) {
9481 mp_raise_msg (& mp_type_bleio_RoleError , msg );
9582}
83+
9684//| class SecurityError(BluetoothError):
9785//| """Raised when a security related error occurs."""
9886//| ...
@@ -183,7 +171,6 @@ STATIC const mp_rom_map_elem_t bleio_module_globals_table[] = {
183171
184172 // Errors
185173 { MP_ROM_QSTR (MP_QSTR_BluetoothError ), OBJ_FROM_PTR (& mp_type_bleio_BluetoothError ) },
186- { MP_ROM_QSTR (MP_QSTR_ConnectionError ), OBJ_FROM_PTR (& mp_type_bleio_ConnectionError ) },
187174 { MP_ROM_QSTR (MP_QSTR_RoleError ), OBJ_FROM_PTR (& mp_type_bleio_RoleError ) },
188175 { MP_ROM_QSTR (MP_QSTR_SecurityError ), OBJ_FROM_PTR (& mp_type_bleio_SecurityError ) },
189176
0 commit comments