error_management.h File Reference

Go to the source code of this file.

Defines

#define ASSERT(x)   if (!(x)) gestion_erreurs_set(__LINE__, __FILE__, "ASSERT(" #x ")")
#define SET_ERROR(x)   gestion_erreurs_set(__LINE__, __FILE__, (x))
#define SET_ERROR1(x, y)   gestion_erreurs_set1(__LINE__, __FILE__, (x), (y))

Functions

void gestion_erreurs_set (int line, char *_file, char *_msg)
void gestion_erreurs_set1 (int line, char *_file, char *_msg, void *_arg1)


Define Documentation

#define ASSERT (  )     if (!(x)) gestion_erreurs_set(__LINE__, __FILE__, "ASSERT(" #x ")")

#define SET_ERROR (  )     gestion_erreurs_set(__LINE__, __FILE__, (x))

Definition at line 37 of file DATA_EXTRACT/error_management.h.

Referenced by format_data_get_data(), get_path(), and WinMain().

#define SET_ERROR1 ( x,
 )     gestion_erreurs_set1(__LINE__, __FILE__, (x), (y))

Definition at line 39 of file DATA_EXTRACT/error_management.h.


Function Documentation

void gestion_erreurs_set ( int  line,
char *  _file,
char *  _msg 
)

Definition at line 35 of file DATA_EXTRACT/error_management.c.

00036 {
00037      char _temp[1024];
00038 
00039      // Print the line, the file where the error come from
00040      // Also print the message
00041      sprintf(_temp, "Error !\nFile: %s\nLine: %i\n%s", _file, line, _msg);
00042      printf(_temp);
00043      // press enter...
00044      system("PAUSE");
00045      // Exit the program
00046      exit(0);
00047 }

void gestion_erreurs_set1 ( int  line,
char *  _file,
char *  _msg,
void *  _arg1 
)

Definition at line 50 of file DATA_EXTRACT/error_management.c.

00051 {
00052      char _temp[1024];
00053 
00054      sprintf(_temp, _msg, _arg1);
00055      gestion_erreurs_set(line, _file, _temp);
00056 }


Generated on Fri Feb 19 02:23:19 2010 for AVR32 UC3 - EVK1104 DSPLib Demo Documentation by  doxygen 1.5.5