EmbeddedEtcher
Functions
error.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "error.h"
#include "helpers.h"
#include "printf.h"
#include "ossettings.h"
Include dependency graph for error.c:

Functions

uint8_t osExplainError (const char *ifile, const uint8_t iline, const osError_t ierror, char *iomessage)
 
uint8_t osPrintError (const char *ifile, const int iline, const osError_t ierror)
 
uint8_t osExplainWarning (const char *ifile, const uint8_t iline, const osWarning_t ierror, char *iomessage)
 
uint8_t osPrintWarning (const char *ifile, const int iline, const osWarning_t iwarning)
 

Function Documentation

◆ osExplainError()

uint8_t osExplainError ( const char *  ifile,
const uint8_t  iline,
const osError_t  ierror,
char *  iomessage 
)

Creating a error message string from inter alia an error code.

Parameters
ifileFilename where error occurs.
ilineLine where error occurs.
ierrorError code.
messageMessage related to the error.
Return values
1(SUCCESS) or 0 (FAILURE).

◆ osExplainWarning()

uint8_t osExplainWarning ( const char *  ifile,
const uint8_t  iline,
const osWarning_t  ierror,
char *  iomessage 
)

Creating a warning message string from inter alia a warning code.

Parameters
ifileFilename where warning occurs.
ilineLine where warning occurs.
ierrorWarning code.
messageMessage related to the warning.
Return values
1(SUCCESS) or 0 (FAILURE).

◆ osPrintError()

uint8_t osPrintError ( const char *  ifile,
const int  iline,
const osError_t  ierror 
)

Print error. This is where the error output can be redirected (later).

Parameters
ifileFilename where error occurs.
ilineLine where error occurs.
ierrorError code.
Return values
1(SUCCESS) or 0 (FAILURE).

◆ osPrintWarning()

uint8_t osPrintWarning ( const char *  ifile,
const int  iline,
const osWarning_t  ierror 
)

Print warning. This is where the warning output can be redirected (later).

Parameters
ifileFilename where warning occurs.
ilineLine where warning occurs.
ierrorWarning code.
Return values
1(SUCCESS) or 0 (FAILURE).