34#include "CLHEP/Exceptions/defs.h"
35#include "CLHEP/Exceptions/ZMexception.h"
36#include "CLHEP/Exceptions/ZMexAction.h"
37#include "CLHEP/Exceptions/ZMexClassInfo.h"
38#include "CLHEP/Exceptions/ZMexHandler.h"
39#include "CLHEP/Exceptions/ZMexLogger.h"
40#include "CLHEP/Exceptions/ZMexLogResult.h"
41#include "CLHEP/Exceptions/ZMexSeverity.h"
124 std::ostringstream mesg;
132 <<
"-" <<
name() <<
" [#" <<
count() <<
"]";
139 mesg <<
NEXT "-- Note: severity threshhold has been reached; "
140 "logging will be suppressed "
141 "for any future exceptions of this severity";
145 mesg <<
NEXT "-- Note: class threshhold has been reached; "
146 "logging will be suppressed "
147 "for any future exceptions of this class";
150 if ( optText.length() )
151 mesg <<
NEXT << optText;
156 time_t now( time(0) );
157 char * timeText = ctime( & now );
159 mesg <<
NEXT << timeText;
163 mesg <<
NEXT "-- ZMthrow was issued at line " <<
line();
169 unsigned long lastSlash = fullName.find_last_of(
"/\\");
170 if ( lastSlash == fullName.length() ) {
173 fname = fullName.substr(lastSlash+1);
176 mesg <<
NEXT "of file \"" << fname <<
'\"';
191 return mesg.str() +
'\n';
200 const std::ostringstream & msg
206, sourceFileName_(
"not ZMthrow'n as of yet" )
const std::string facility() const
const std::string name() const
virtual bool isFilePathDesired() const
virtual bool isTimeDesired() const
ZMexLogBehavior * control()
std::string fileName() const
static ZMexClassInfo _classInfo
virtual std::string logMessage(const std::string optText="") const
ZMexception(const std::string &mesg, const ZMexSeverity howBad=ZMexSEVERITYenumLAST, int icount=ZMexception::_classInfo.nextCount())
std::string message() const
virtual zmex::ZMexClassInfo & classInfo() const
virtual std::string facility() const
ZMexSeverity severity() const
virtual std::string name() const
int ZMexSeverityLimit[ZMexSEVERITYenumLAST]
ZMexHandler & ZMhandler()
std::string ZMexUserActivity
const char ZMexSeverityLetter[ZMexSEVERITYenumLAST]