creaContours_lib
OsirixParserErrorHandler Class Reference

#include <OsirixParser.h>

Inheritance diagram for OsirixParserErrorHandler:
Collaboration diagram for OsirixParserErrorHandler:

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
 

Detailed Description

Definition at line 173 of file OsirixParser.h.

Constructor & Destructor Documentation

OsirixParserErrorHandler::OsirixParserErrorHandler ( )

Default Constructor

The Error Handler's interface implementation Default Constructor

Definition at line 499 of file OsirixParser.cxx.

500 : ErrorHandler(){
501 
502 
503 
504 
505 }
OsirixParserErrorHandler::~OsirixParserErrorHandler ( )

Desctructor by defect

Definition at line 509 of file OsirixParser.cxx.

509  {
510 }

Member Function Documentation

void OsirixParserErrorHandler::error ( const SAXParseException &  exc)
virtual

Definition at line 515 of file OsirixParser.cxx.

References errormsg.

515  {
516  char c[1000];
517  errormsg = "Column ";
518 // errormsg += itoa(exc.getColumnNumber(),c,10);
519 #ifdef WIN32
520  sprintf_s(c,"%d",(int)(exc.getColumnNumber()));
521 #else
522  sprintf(c,"%d",(int)(exc.getColumnNumber()));
523 #endif
524  errormsg += std::string(c);
525 
526  errormsg += " Line ";
527 // errormsg += itoa(exc.getLineNumber(),c,10);
528 #ifdef WIN32
529  sprintf_s(c,"%d",(int)(exc.getLineNumber()));
530 #else
531  sprintf(c,"%d",(int)(exc.getLineNumber()));
532 #endif
533  errormsg += std::string(c);
534 
535  errormsg += " ";
536  errormsg += XMLString::transcode(exc.getMessage());
537 
538 }
void OsirixParserErrorHandler::fatalError ( const SAXParseException &  exc)
virtual

Definition at line 540 of file OsirixParser.cxx.

References errormsg.

540  {
541  char c[1000];
542  errormsg = "Column ";
543 // errormsg += itoa(exc.getColumnNumber(),c,10);
544 #ifdef WIN32
545  sprintf_s(c,"%d",(int)(exc.getColumnNumber()));
546 #else
547  sprintf(c,"%d",(int)(exc.getColumnNumber()));
548 #endif
549  errormsg += std::string(c);
550 
551  errormsg += " Line ";
552 // errormsg += itoa(exc.getLineNumber(),c,10);
553 #ifdef WIN32
554  sprintf_s(c,"%d",(int)(exc.getLineNumber()));
555 #else
556  sprintf(c,"%d",(int)(exc.getLineNumber()));
557 #endif
558  errormsg += std::string(c);
559 
560  errormsg += " ";
561  errormsg += XMLString::transcode(exc.getMessage());
562 }
std::string OsirixParserErrorHandler::getErrorMsg ( )

Definition at line 567 of file OsirixParser.cxx.

References errormsg.

567  {
568  return this->errormsg;
569 }
void OsirixParserErrorHandler::resetErrors ( )
virtual

Definition at line 564 of file OsirixParser.cxx.

564  {
565 }
void OsirixParserErrorHandler::warning ( const SAXParseException &  exc)
virtual

Definition at line 512 of file OsirixParser.cxx.

512  {
513 }

Member Data Documentation

std::string OsirixParserErrorHandler::errormsg
private

Definition at line 202 of file OsirixParser.h.

Referenced by error(), fatalError(), and getErrorMsg().


The documentation for this class was generated from the following files: