BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
ClientErrHandler.cxx
Go to the documentation of this file.
1#include "ClientErrHandler/ClientErrHandler.h"
2#include "DistBossUtil/DimErrorMsg.h"
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
17{
18}
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()