suricata
util-error.c File Reference
#include "util-error.h"
Include dependency graph for util-error.c:

Go to the source code of this file.

Macros

#define CASE_CODE(E)   case E: return #E
 

Functions

const char * SCErrorToString (SCError err)
 Maps the error code, to its string equivalent. More...
 

Variables

thread_local SCError sc_errno = SC_OK
 

Detailed Description

Author
Anoop Saldanha anoop.nosp@m.sald.nosp@m.anha@.nosp@m.gmai.nosp@m.l.com

Error utility functions

Todo:
Needs refining of the error codes. Renaming with a prefix of SC_ERR, removal of duplicates and entries have to be made in util-error.c

Definition in file util-error.c.

Macro Definition Documentation

◆ CASE_CODE

#define CASE_CODE (   E)    case E: return #E

Definition at line 33 of file util-error.c.

Function Documentation

◆ SCErrorToString()

const char* SCErrorToString ( SCError  err)

Maps the error code, to its string equivalent.

Parameters
Theerror code
Return values
Thestring equivalent for the error code

Definition at line 41 of file util-error.c.

References CASE_CODE, SC_EEXIST, SC_EINVAL, SC_ELIMIT, SC_ENOENT, SC_ENOMEM, SC_ERR_MAX, and SC_OK.

Variable Documentation

◆ sc_errno