org::xmlBlaster::util::XmlBlasterException Class Reference

List of all members.

Public Member Functions

 XmlBlasterException (const std::string &errorCodeStr, const std::string &node, const std::string &location, const std::string &lang="en", const std::string &message="", const std::string &versionInfo="@version@", const std::string &timestampStr="", const std::string &stackTrace="", const std::string &embeddedMessage="", const std::string &transactionInfo="<transactioninfo/>")
 For internal use: Deserializing and exception creation from CORBA XmlBlasterException.
 XmlBlasterException (const ErrorCode &errorCode, const std::string &node, const std::string &location, const std::string &lang, const std::string &versionInfo="@version@", const std::string &timestampStr="", const std::string &stackTrace="", const std::string &embeddedMessage="", const std::string &transactionInfo="<transactioninfo/>")
 XmlBlasterException (const ErrorCode &errorCode, const std::string &node, const std::string &embeddedMessage)
virtual ~XmlBlasterException () throw ()
std::string getErrorCodeStr () const
std::string getNode () const
void setLocation (const std::string &location)
std::string getLocation () const
std::string getLang () const
std::string getMessage () const
std::string getRawMessage () const
 
Returns:
The original message text

std::string getVersionInfo () const
 A comma separated list with key/values containing detailed information about the server environment.
std::string getTimestamp () const
 org::xmlBlaster::util::Timestamp when exception was thrown
std::string getStackTraceStr () const
 
Returns:
The stack trace or null, e.g.

std::string getEmbeddedMessage () const
 
Returns:
The toString() of the embedded exception which is <classname>:getMessage()
or null if not applicable

std::string getTransactionInfo () const
 
Returns:
Not defined yet

bool isInternal () const
bool isResource () const
bool isCommunication () const
bool isUser () const
bool isTransaction () const
const char * what () const throw ()
 Enforced by std::exception.
std::string toString () const
 Returns a std::stringified version of the exception.
std::string toXml () const
 Create a XML representation of the Exception.

Static Public Member Functions

static XmlBlasterException parseFromString (std::string fromString)
 Parsing what toString() produced.
static std::string getStackTrace (int maxNumOfLines=20)
 Returns a std::string containing the stack trace if the system and the compilation permit it (_ENABLE_STACK_TRACE must be set: which is set in xmlBlasterDef.h in case of the gnu compiler.

Detailed Description

Definition at line 52 of file XmlBlasterException.h.


Constructor & Destructor Documentation

org::xmlBlaster::util::XmlBlasterException::XmlBlasterException ( const std::string &  errorCodeStr,
const std::string &  node,
const std::string &  location,
const std::string &  lang = "en",
const std::string &  message = "",
const std::string &  versionInfo = "@version@",
const std::string &  timestampStr = "",
const std::string &  stackTrace = "",
const std::string &  embeddedMessage = "",
const std::string &  transactionInfo = "<transactioninfo/>" 
)

For internal use: Deserializing and exception creation from CORBA XmlBlasterException.

org::xmlBlaster::util::XmlBlasterException::XmlBlasterException ( const ErrorCode errorCode,
const std::string &  node,
const std::string &  location,
const std::string &  lang,
const std::string &  versionInfo = "@version@",
const std::string &  timestampStr = "",
const std::string &  stackTrace = "",
const std::string &  embeddedMessage = "",
const std::string &  transactionInfo = "<transactioninfo/>" 
)

org::xmlBlaster::util::XmlBlasterException::XmlBlasterException ( const ErrorCode errorCode,
const std::string &  node,
const std::string &  embeddedMessage 
)

org::xmlBlaster::util::XmlBlasterException::~XmlBlasterException (  )  throw () [virtual]

Definition at line 93 of file XmlBlasterException.cpp.


Member Function Documentation

std::string org::xmlBlaster::util::XmlBlasterException::getErrorCodeStr (  )  const

Referenced by org::xmlBlaster::util::dispatch::ConnectionsHandler::connect(), org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException(), org::xmlBlaster::client::protocol::socket::SocketDriver::convertToSocketException(), org::xmlBlaster::test::TestQueue::testMaxNumOfBytes(), and org::xmlBlaster::test::TestQueue::testMaxNumOfEntries().

std::string org::xmlBlaster::util::XmlBlasterException::getNode (  )  const

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

void org::xmlBlaster::util::XmlBlasterException::setLocation ( const std::string &  location  ) 

Definition at line 103 of file XmlBlasterException.h.

std::string org::xmlBlaster::util::XmlBlasterException::getLocation (  )  const

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getLang (  )  const

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getMessage (  )  const

Referenced by org::xmlBlaster::util::queue::CacheQueuePlugin::CacheQueuePlugin(), org::xmlBlaster::util::queue::CacheQueuePlugin::clear(), org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException(), org::xmlBlaster::client::protocol::socket::SocketDriver::convertToSocketException(), org::xmlBlaster::util::queue::CacheQueuePlugin::destroy(), main(), org::xmlBlaster::util::queue::CacheQueuePlugin::put(), org::xmlBlaster::test::TestGet::testGet(), org::xmlBlaster::test::TestSubXPath::testInitial(), org::xmlBlaster::util::dispatch::ConnectionsHandler::timeout(), and org::xmlBlaster::util::dispatch::ConnectionsHandler::toPollingOrDead().

std::string org::xmlBlaster::util::XmlBlasterException::getRawMessage (  )  const

Returns:
The original message text

std::string org::xmlBlaster::util::XmlBlasterException::getVersionInfo (  )  const

A comma separated list with key/values containing detailed information about the server environment.

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getTimestamp (  )  const

org::xmlBlaster::util::Timestamp when exception was thrown

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getStackTraceStr (  )  const

Returns:
The stack trace or null, e.g.

  stackTrace= errorCode=internal.unknown message=Bla bla
    at org.xmlBlaster.util.XmlBlasterException.main(XmlBlasterException.java:488)
 
The first line is the result from toString() and the following lines are the stackTrace

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getEmbeddedMessage (  )  const

Returns:
The toString() of the embedded exception which is <classname>:getMessage()
or null if not applicable

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

std::string org::xmlBlaster::util::XmlBlasterException::getTransactionInfo (  )  const

Returns:
Not defined yet

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::convertToCorbaException().

bool org::xmlBlaster::util::XmlBlasterException::isInternal (  )  const

bool org::xmlBlaster::util::XmlBlasterException::isResource (  )  const

bool org::xmlBlaster::util::XmlBlasterException::isCommunication (  )  const

Referenced by org::xmlBlaster::util::dispatch::ConnectionsHandler::connect(), org::xmlBlaster::util::dispatch::ConnectionsHandler::flushQueueUnlocked(), org::xmlBlaster::util::dispatch::ConnectionsHandler::isRecoverable(), org::xmlBlaster::util::EmbeddedServer::isSomeServerResponding(), org::xmlBlaster::util::EmbeddedServer::start(), org::xmlBlaster::util::EmbeddedServer::stop(), and org::xmlBlaster::util::dispatch::ConnectionsHandler::toPollingOrDead().

bool org::xmlBlaster::util::XmlBlasterException::isUser (  )  const

bool org::xmlBlaster::util::XmlBlasterException::isTransaction (  )  const

const char* org::xmlBlaster::util::XmlBlasterException::what (  )  const throw ()

Enforced by std::exception.

Returns:
The complete exception text with location and message

std::string org::xmlBlaster::util::XmlBlasterException::toString (  )  const

Returns a std::stringified version of the exception.

Referenced by org::xmlBlaster::util::dispatch::ConnectionsHandler::connect(), org::xmlBlaster::client::XmlBlasterAccess::getLoginName(), org::xmlBlaster::test::TestLeaveServer::testLeaveServer(), org::xmlBlaster::test::TestFailsafe::testReconnect(), and org::xmlBlaster::util::dispatch::ConnectionsHandler::timeout().

static XmlBlasterException org::xmlBlaster::util::XmlBlasterException::parseFromString ( std::string  fromString  )  [static]

Parsing what toString() produced.

std::string org::xmlBlaster::util::XmlBlasterException::toXml (  )  const

Create a XML representation of the Exception.

   <exception errorCode='resource.outOfMemory'>
      <class>JavaClass</class>
      <message><![cdata[  bla bla ]]></message>
   </exception>
 

Referenced by Leak::checkConnection(), Leak::checkConnection2(), Leak::checkConnection3(), Leak::checkGlobal(), Leak::checkGlobal2(), org::xmlBlaster::util::dispatch::ConnectionsHandler::connect(), TestEmptyContent::execute(), MultiConnectDemo::execute(), HelloWorld2::execute(), main(), PublishDemo::publish(), org::xmlBlaster::test::TestSubXPath::setUp(), org::xmlBlaster::test::TestSub::setUp(), org::xmlBlaster::test::TestRam::setUp(), org::xmlBlaster::test::TestLeaveServer::setUp(), org::xmlBlaster::test::TestGet::setUp(), org::xmlBlaster::test::TestFailsafe::setUp(), org::xmlBlaster::test::TestConnect::setUp(), org::xmlBlaster::test::TestCommand::setUp(), org::xmlBlaster::util::EmbeddedServer::start(), org::xmlBlaster::test::TestSub::tearDown(), org::xmlBlaster::test::TestRam::tearDown(), org::xmlBlaster::test::TestGet::tearDown(), org::xmlBlaster::test::TestFailsafe::tearDown(), org::xmlBlaster::test::TestFailsafe::testFailsafe(), org::xmlBlaster::test::TestGet::testGet(), org::xmlBlaster::test::TestLeaveServer::testLeaveServer(), org::xmlBlaster::test::TestGet::testMany(), org::xmlBlaster::test::TestRam::testPublish(), org::xmlBlaster::test::TestSub::testPublishCorbaMethods(), org::xmlBlaster::test::TestSub::testPublishSTLMethods(), org::xmlBlaster::test::TestConnect::testPubSub(), org::xmlBlaster::test::TestFailsafe::testReconnect(), org::xmlBlaster::test::TestCommand::testSendAdministrativeCommand(), org::xmlBlaster::test::TestCommand::testSetCallbackDispatcherActive(), org::xmlBlaster::test::TestSub::testSubscribeSpecificCallback(), and org::xmlBlaster::test::TestSub::testSubscribeXPath().

string org::xmlBlaster::util::XmlBlasterException::getStackTrace ( int  maxNumOfLines = 20  )  [static]

Returns a std::string containing the stack trace if the system and the compilation permit it (_ENABLE_STACK_TRACE must be set: which is set in xmlBlasterDef.h in case of the gnu compiler.

Definition at line 304 of file XmlBlasterException.cpp.


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