dlvhex  2.5.0
PluginError Class Reference

A plugin error is thrown by plugins and caught inside dlvhex. More...

#include <include/dlvhex2/Error.h>

Inheritance diagram for PluginError:
Collaboration diagram for PluginError:

Public Member Functions

 PluginError (const std::string &msg)
 Constructor.
virtual ~PluginError () throw ()
 See SyntaxError::~SyntaxError().
void setContext (const std::string &ctx)
 Sets the context of the error.
virtual std::string getErrorMsg () const
 Returns a formatted error message.

Private Attributes

std::string context
 Error context.

Detailed Description

A plugin error is thrown by plugins and caught inside dlvhex.

Definition at line 158 of file Error.h.


Constructor & Destructor Documentation

PluginError::PluginError ( const std::string &  msg) [explicit]

Constructor.

Parameters:
msgError message.

Definition at line 102 of file Error.cpp.

virtual PluginError::~PluginError ( ) throw () [inline, virtual]

See SyntaxError::~SyntaxError().

Definition at line 171 of file Error.h.


Member Function Documentation

std::string PluginError::getErrorMsg ( ) const [virtual]

Returns a formatted error message.

The returned. message is built from the context and the actual error message.

Parameters:
msgError message.

Reimplemented from GeneralError.

Definition at line 116 of file Error.cpp.

References context.

void PluginError::setContext ( const std::string &  ctx)

Sets the context of the error.

The context is usually the Atom, where this error occurred, and possibly the line number, if available.

Parameters:
ctxError context.

Definition at line 109 of file Error.cpp.

References context.


Field Documentation

std::string PluginError::context [private]

Error context.

Definition at line 195 of file Error.h.

Referenced by getErrorMsg(), and setContext().


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