#include <OsirixParser.h>
Public Member Functions | |
OsirixParserErrorHandler () | |
~OsirixParserErrorHandler () | |
virtual void | warning (const SAXParseException &exc) |
virtual void | error (const SAXParseException &exc) |
virtual void | fatalError (const SAXParseException &exc) |
virtual void | resetErrors () |
std::string | getErrorMsg () |
Private Attributes | |
std::string | errormsg |
Definition at line 148 of file OsirixParser.h.
OsirixParserErrorHandler::OsirixParserErrorHandler | ( | ) |
Default Constructor
The Error Handler's interface implementation Default Constructor
Definition at line 474 of file OsirixParser.cxx.
OsirixParserErrorHandler::~OsirixParserErrorHandler | ( | ) |
void OsirixParserErrorHandler::error | ( | const SAXParseException & | exc | ) | [virtual] |
Definition at line 490 of file OsirixParser.cxx.
References errormsg.
00490 { 00491 char c[1000]; 00492 errormsg = "Column "; 00493 // errormsg += itoa(exc.getColumnNumber(),c,10); 00494 #ifdef WIN32 00495 sprintf_s(c,"%d",(int)(exc.getColumnNumber())); 00496 #else 00497 sprintf(c,"%d",(int)(exc.getColumnNumber())); 00498 #endif 00499 errormsg += std::string(c); 00500 00501 errormsg += " Line "; 00502 // errormsg += itoa(exc.getLineNumber(),c,10); 00503 #ifdef WIN32 00504 sprintf_s(c,"%d",(int)(exc.getLineNumber())); 00505 #else 00506 sprintf(c,"%d",(int)(exc.getLineNumber())); 00507 #endif 00508 errormsg += std::string(c); 00509 00510 errormsg += " "; 00511 errormsg += XMLString::transcode(exc.getMessage()); 00512 00513 }
void OsirixParserErrorHandler::fatalError | ( | const SAXParseException & | exc | ) | [virtual] |
Definition at line 515 of file OsirixParser.cxx.
References errormsg.
00515 { 00516 char c[1000]; 00517 errormsg = "Column "; 00518 // errormsg += itoa(exc.getColumnNumber(),c,10); 00519 #ifdef WIN32 00520 sprintf_s(c,"%d",(int)(exc.getColumnNumber())); 00521 #else 00522 sprintf(c,"%d",(int)(exc.getColumnNumber())); 00523 #endif 00524 errormsg += std::string(c); 00525 00526 errormsg += " Line "; 00527 // errormsg += itoa(exc.getLineNumber(),c,10); 00528 #ifdef WIN32 00529 sprintf_s(c,"%d",(int)(exc.getLineNumber())); 00530 #else 00531 sprintf(c,"%d",(int)(exc.getLineNumber())); 00532 #endif 00533 errormsg += std::string(c); 00534 00535 errormsg += " "; 00536 errormsg += XMLString::transcode(exc.getMessage()); 00537 }
std::string OsirixParserErrorHandler::getErrorMsg | ( | ) |
Definition at line 542 of file OsirixParser.cxx.
References errormsg.
00542 { 00543 return this->errormsg; 00544 }
void OsirixParserErrorHandler::resetErrors | ( | ) | [virtual] |
void OsirixParserErrorHandler::warning | ( | const SAXParseException & | exc | ) | [virtual] |
std::string OsirixParserErrorHandler::errormsg [private] |
Definition at line 177 of file OsirixParser.h.
Referenced by error(), fatalError(), and getErrorMsg().