error when there is no handler

pull/9399/head
paul-szczepanek-arm 2019-01-18 14:55:38 +00:00
parent fa36ed02ee
commit 42e4290160
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,10 @@ static const GapScanningParams default_scan_params;
static const mbed_error_status_t mixed_scan_api_error = static const mbed_error_status_t mixed_scan_api_error =
MBED_MAKE_ERROR(MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_USE_INCOMPATIBLE_API); MBED_MAKE_ERROR(MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_USE_INCOMPATIBLE_API);
static const mbed_error_status_t illegal_state_error =
MBED_MAKE_ERROR(MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_ILLEGAL_STATE);
/* /*
* Return true if value is included in the range [lower_bound : higher_bound] * Return true if value is included in the range [lower_bound : higher_bound]
*/ */
@ -1792,6 +1796,8 @@ void GenericGap::on_connection_parameter_request(const pal::GapRemoteConnectionP
supervision_timeout_t(e.supervision_timeout) supervision_timeout_t(e.supervision_timeout)
) )
); );
} else {
MBED_ERROR(illegal_state_error, "Event handler required if connection params are user handled");
} }
} else { } else {
_pal_gap.accept_connection_parameter_request( _pal_gap.accept_connection_parameter_request(

View File

@ -792,6 +792,7 @@ typedef enum _mbed_error_code {
MBED_DEFINE_SYSTEM_ERROR(AUTHENTICATION_FAILED, 69), /* 325 Authentication Failed */ MBED_DEFINE_SYSTEM_ERROR(AUTHENTICATION_FAILED, 69), /* 325 Authentication Failed */
MBED_DEFINE_SYSTEM_ERROR(RBP_AUTHENTICATION_FAILED, 70), /* 326 Rollback Protection Authentication Failed */ MBED_DEFINE_SYSTEM_ERROR(RBP_AUTHENTICATION_FAILED, 70), /* 326 Rollback Protection Authentication Failed */
MBED_DEFINE_SYSTEM_ERROR(BLE_USE_INCOMPATIBLE_API, 71), /* 327 Concurrent use of incompatible versions of a BLE API */ MBED_DEFINE_SYSTEM_ERROR(BLE_USE_INCOMPATIBLE_API, 71), /* 327 Concurrent use of incompatible versions of a BLE API */
MBED_DEFINE_SYSTEM_ERROR(BLE_ILLEGAL_STATE, 72), /* 328 BLE stack entered illegal state */
//Everytime you add a new system error code, you must update //Everytime you add a new system error code, you must update
//Error documentation under Handbook to capture the info on //Error documentation under Handbook to capture the info on