/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/DistBoss/ClientErrHandler/ClientErrHandler-00-00-01/src/ClientErrHandler.cxx

Go to the documentation of this file.
00001 #include "ClientErrHandler/ClientErrHandler.h"
00002 #include "DistBossUtil/DimErrorMsg.h"
00003 #include "dic.hxx"
00004 #include <iostream>
00005 
00006 ClientErrHandler* ClientErrHandler::s_instance = 0;
00007 
00008 void ClientErrHandler::registerInstance()
00009 {
00010    if ( s_instance == 0 ) {
00011       s_instance = new ClientErrHandler();
00012       DimClient::addErrorHandler( s_instance );
00013    }
00014 }
00015 
00016 ClientErrHandler::ClientErrHandler()
00017 {
00018 }
00019 
00020 void ClientErrHandler::errorHandler(int severity, int code, char* msg)
00021 {
00022    std::cerr << '[' << DimError::toSeverity(severity) << "] " << DimError::toMsg(code) << std::endl;
00023    if ( msg != 0 ) {
00024       std::cout << '[' << DimError::toSeverity(severity) << "] " << msg << std::endl;
00025    }
00026 }

Generated on Tue Nov 29 22:58:01 2016 for BOSS_7.0.2 by  doxygen 1.4.7