9 #include <daq/rawdata/CprErrorMessage.h>
23 CprErrorMessage::CprErrorMessage()
25 openlog(
"", LOG_PERROR , LOG_LOCAL0);
28 CprErrorMessage::~CprErrorMessage()
34 void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
string err_str)
37 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
39 PrintError(err_str.c_str());
42 void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
char* err_message,
43 const char* file,
const char* func_name,
const int line)
45 string err_str = err_message;
47 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
49 PrintError(err_message, file, func_name, line);
53 void CprErrorMessage::PrintError(
char* err_message,
const char* file,
const char* func_name,
const int line)
56 sprintf(err_buf,
"%s : %s %s %d", err_message, file, func_name, line);
58 printf(
"%s", err_buf); fflush(stdout);
82 void CprErrorMessage::PrintError(
const char* err_message)
84 printf(
"[DEBUG] %s", err_message);
87 printf(
"[FATAL] %s\n", err_message); exit(1);