BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
ClientErrHandler.cxx
Go to the documentation of this file.
3#include "dic.hxx"
4#include <iostream>
5
6ClientErrHandler* ClientErrHandler::s_instance = 0;
7
9{
10 if ( s_instance == 0 ) {
11 s_instance = new ClientErrHandler();
12 DimClient::addErrorHandler( s_instance );
13 }
14}
15
19
20void ClientErrHandler::errorHandler(int severity, int code, char* msg)
21{
22 std::cerr << '[' << DimError::toSeverity(severity) << "] " << DimError::toMsg(code) << std::endl;
23 if ( msg != 0 ) {
24 std::cout << '[' << DimError::toSeverity(severity) << "] " << msg << std::endl;
25 }
26}
static void registerInstance()
const char * toMsg(int code)
Definition DimErrorMsg.h:21
const char * toSeverity(int severity)
Definition DimErrorMsg.h:8