Contiki-NG
Loading...
Searching...
No Matches
edhoc-error.c File Reference

Error handling module for EDHOC. More...

#include "edhoc-error.h"
#include <string.h>

Go to the source code of this file.

Functions

const char * edhoc_error_string (edhoc_error_t error)
 Get a human-readable error message for an error code.
edhoc_error_t edhoc_set_error_context (edhoc_error_t code, const char *file, int line, const char *function, const char *message)
 Set error context for debugging (internal use).
const edhoc_error_context_tedhoc_get_last_error_context (void)
 Get the last error context (for debugging).

Detailed Description

Error handling module for EDHOC.

Author
Niclas Finne nicla.nosp@m.s.fi.nosp@m.nne@r.nosp@m.i.se, Nicolas Tsiftes nicol.nosp@m.as.t.nosp@m.sifte.nosp@m.s@ri.nosp@m..se

Definition in file edhoc-error.c.

Function Documentation

◆ edhoc_error_string()

◆ edhoc_get_last_error_context()

const edhoc_error_context_t * edhoc_get_last_error_context ( void )

Get the last error context (for debugging).

Returns
Pointer to last error context, or NULL if none

Definition at line 176 of file edhoc-error.c.

◆ edhoc_set_error_context()

edhoc_error_t edhoc_set_error_context ( edhoc_error_t code,
const char * file,
int line,
const char * function,
const char * message )

Set error context for debugging (internal use).

Parameters
codeError code
fileSource file name
lineLine number
functionFunction name
messageAdditional message
Returns
The error code passed in

Definition at line 162 of file edhoc-error.c.