rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::XmlParseLineColException Class Reference
[Exceptions]

Defines a parse exception including line and column meta information. More...

#include <rwsf/core/XmlParseLineColException.h>

Inheritance diagram for rwsf::XmlParseLineColException:
rwsf::XmlParseException rwsf::XmlException rwsf::Exception

List of all members.

Public Member Functions

virtual ~XmlParseLineColException () throw ()
size_t getLineNumber (void) const
size_t getColumnNumber (void) const

Private Member Functions

virtual void raise (void) const

Detailed Description

XmlParseLineColException defines an exception type that captures line and column information for where the parse failure occurs.

The code sample below shows a try-catch block that contains a call to unmarshal(). The XML parsing error exception contains a descriptive message and the line number and column number at which the method detected the error.

   try {
     aComplexType.unmarshal(xmlContents);
   } catch (const rwsf::XmlParseLineColException &e) {
     std::cerr << "Parse error when unmarshaling : "
                     << e.what() << std::endl;
     std::cerr << "Line number: " << e.getLineNumber()
                     << std::endl;
     std::cerr << "Column number: " << e.getColumnNumber()
                     << std::endl;
     return 1;
   } catch (const rwsf::Exception &e) {
     std::cerr << "Error : " << e.what() << std::endl;
     return 1;
   } catch (const RWxmsg &e) {
     std::cerr << "Error : " << e.what() << std::endl;
     return 1;
   }catch (const std::exception &e) {
     std:: cerr << "Error : " << e.what() << std::endl;
     return 1;
   }

Constructor & Destructor Documentation

virtual rwsf::XmlParseLineColException::~XmlParseLineColException (  )  throw () [virtual]

Destructor.


Member Function Documentation

size_t rwsf::XmlParseLineColException::getColumnNumber ( void   )  const

Returns the column number in the XML document where the parse error occurred.

size_t rwsf::XmlParseLineColException::getLineNumber ( void   )  const

Returns the line number in the XML document where the parse error occurred.

Reimplemented from rwsf::Exception.

virtual void rwsf::XmlParseLineColException::raise ( void   )  const [private, virtual]

Methods defined by macro in Exception.h. raise (throw) clone (copy)

Reimplemented from rwsf::XmlParseException.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.