Changeset 10511 for trunk/FACT++/src/DimErrorRedirecter.cc
- Timestamp:
- 05/02/11 19:05:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimErrorRedirecter.cc
r10479 r10511 27 27 28 28 DimClient::addErrorHandler(this); 29 DimServer::addExitHandler(this); 29 30 } 30 31 … … 32 33 { 33 34 DimClient::addErrorHandler(0); 35 DimServer::addExitHandler(0); 34 36 } 35 37 36 38 void DimErrorRedirecter::errorHandler(int severity, int code, char *msg) 37 39 { 40 static const string id = "DIM|"; 41 38 42 switch (severity) 39 43 { 40 case DIM_FATAL: fMsg.Error(msg); return; 41 case DIM_ERROR: fMsg.Error(msg); return; 42 case DIM_WARNING: fMsg.Warn(msg); return; 43 case DIM_INFO: fMsg.Info(msg); return; 44 case DIM_FATAL: fMsg.Error(id+msg); break; 45 case DIM_ERROR: fMsg.Error(id+msg); break; 46 case DIM_WARNING: fMsg.Warn(id+msg); break; 47 case DIM_INFO: fMsg.Info(id+msg); break; 48 default: 49 stringstream str; 50 str << "DIM message with unknown severity (" << severity << "): "; 51 str << msg << " (" << code << ")"; 52 fMsg.Message(str); 53 break; 44 54 } 45 55 46 stringstream str; 47 str << "Severity of Dim message unknown(" << severity << "): "; 48 str << msg << "(" << code << ")"; 49 fMsg.Message(str); 56 if (severity==DIM_FATAL && code==DIMDNSDUPLC) 57 exitHandler(DIMDNSDUPLC); 50 58 51 59 /*
Note:
See TracChangeset
for help on using the changeset viewer.