122 std::ostringstream mesg;
130 <<
"-" <<
name() <<
" [#" <<
count() <<
"]";
137 mesg <<
NEXT "-- Note: severity threshhold has been reached; "
138 "logging will be suppressed "
139 "for any future exceptions of this severity";
143 mesg << NEXT
"-- Note: class threshhold has been reached; "
144 "logging will be suppressed "
145 "for any future exceptions of this class";
148 if ( optText.length() )
149 mesg << NEXT << optText;
154 time_t now( time(0) );
155 char * timeText = ctime( & now );
157 mesg << NEXT << timeText;
161 mesg << NEXT
"-- ZMthrow was issued at line " <<
line();
167 unsigned int lastSlash = fullName.find_last_of(
"/\\");
168 if ( lastSlash == fullName.length() ) {
171 fname = fullName.substr(lastSlash+1);
174 mesg << NEXT
"of file \"" << fname <<
'\"';
177 mesg << NEXT
"... Exception " << (
wasThrown() ?
"thrown!"
189 return mesg.str() +
'\n';
198 const std::ostringstream & msg
204 , sourceFileName_(
"not ZMthrow'n as of yet" )
207 , wasThrown_( false )
std::string message() const
ZMexception(const std::string &mesg, const ZMexSeverity howBad=ZMexSEVERITYenumLAST, int icount=ZMexception::_classInfo.nextCount())
std::string fileName() const
const char ZMexSeverityLetter[ZMexSEVERITYenumLAST]
virtual bool isTimeDesired() const
virtual bool isFilePathDesired() const
int ZMexSeverityLimit[ZMexSEVERITYenumLAST]
static ZMexClassInfo _classInfo
virtual zmex::ZMexClassInfo & classInfo() const
ZMexLogBehavior * control()
const std::string name() const
const std::string facility() const
virtual std::string name() const
virtual std::string facility() const
ZMexHandler & ZMhandler()
std::string ZMexUserActivity
virtual std::string logMessage(const std::string optText="") const
ZMexSeverity severity() const