Skip to content

Commit a2f3c59

Browse files
committed
Add ASSERTATION_FAILED error code
1 parent c3e7ddb commit a2f3c59

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

platform/mbed_assert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ void mbed_assert_internal(const char *expr, const char *file, int line)
2929
char error_message[error_message_length];
3030
snprintf(error_message, error_message_length, "%s%s", error_description, expr);
3131

32-
mbed_error(MBED_ERROR_INVALID_ARGUMENT, error_message, 0, file, line);
32+
mbed_error(MBED_ERROR_ASSERTATION_FAILED, error_message, 0, file, line);
3333
}

platform/mbed_error.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ typedef enum _mbed_error_code {
780780
MBED_DEFINE_SYSTEM_ERROR(BLE_NO_FRAME_INITIALIZED, 65), /* 321 BLE No frame initialized */
781781
MBED_DEFINE_SYSTEM_ERROR(BLE_BACKEND_CREATION_FAILED, 66), /* 322 BLE Backend creation failed */
782782
MBED_DEFINE_SYSTEM_ERROR(BLE_BACKEND_NOT_INITIALIZED, 67), /* 323 BLE Backend not initialized */
783-
783+
MBED_DEFINE_SYSTEM_ERROR(ASSERTATION_FAILED, 68), /* 324 Assertation Failed */
784+
784785
//Everytime you add a new system error code, you must update
785786
//Error documentation under Handbook to capture the info on
786787
//the new error status/codes

0 commit comments

Comments
 (0)