2007-02-15 13:33:32 +00:00
|
|
|
#include "ecoPCR.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2007-09-24 09:48:08 +00:00
|
|
|
/*
|
|
|
|
* print the message given as argument and exit the program
|
|
|
|
* @param error error number
|
|
|
|
* @param message the text explaining what's going on
|
|
|
|
* @param filename the file source where the program failed
|
|
|
|
* @param linenumber the line where it has failed
|
|
|
|
* filename and linenumber are written at pre-processing
|
|
|
|
* time by a macro
|
|
|
|
*/
|
2007-02-15 13:33:32 +00:00
|
|
|
void ecoError(int32_t error,
|
|
|
|
const char* message,
|
|
|
|
const char * filename,
|
|
|
|
int linenumber)
|
|
|
|
{
|
|
|
|
fprintf(stderr,"Error %d in file %s line %d : %s\n",
|
|
|
|
error,
|
|
|
|
filename,
|
|
|
|
linenumber,
|
|
|
|
message);
|
|
|
|
|
|
|
|
abort();
|
|
|
|
}
|