Class Index Cross Index Namespace Index

Class ErrorInfo

Error Information
Contained in: global
Derived from: none
Derived by: none

#include "general/errorinfo.hh"


public function member index:

ErrorInfo(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);
ErrorInfo(const ErrorInfo& e);
~ErrorInfo();
inline int getCode() const; Get Error Code
inline const char* getFile() const; Get File Name
inline const std::string& getInfo() const; Get Error Information
inline int getLibrary() const; Get Library
inline size_t getLine() const; Get Line Number
inline const std::string& getMessage() const; Get Error Message
inline bool operator !=(const ErrorInfo& e) const; Not-Equal Comparison
const ErrorInfo& operator =(const ErrorInfo& e);
bool operator ==(const ErrorInfo& e) const;
 

Description:

This class stores information about an error:

  • mLibrary - The library in which the error occurred (int).
  • mCode - The error code (int)
  • mMsg - A string representation of the error code (string).
  • mInfo - Additional information specific to the error (string)
  • mFile - The file in which the error was thrown (const char*)
  • mLine - The line on which the error was thrown (size_t)
  • This class is used by the LdasException class to store information about a thrown exception.


    Function Member Descriptions:


    ErrorInfo::ErrorInfo


    ErrorInfo(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);



    ErrorInfo::ErrorInfo


    ErrorInfo(const ErrorInfo& e);



    ErrorInfo::~ErrorInfo


    ~ErrorInfo();



    ErrorInfo::getCode - Get Error Code


    inline int getCode() const;

    Return value:
    int


    ErrorInfo::getFile - Get File Name


    inline const char* getFile() const;
    Get the name of the file in which the error was thrown.

    Return value:
    const char*


    ErrorInfo::getInfo - Get Error Information


    inline const std::string& getInfo() const;
    Returns additional information about the error.

    Return value:
    const std::string&


    ErrorInfo::getLibrary - Get Library


    inline int getLibrary() const;

    Return value:
    intThe number of the library which threw the exception.


    ErrorInfo::getLine - Get Line Number


    inline size_t getLine() const;
    Get the line number on which the error was thrown.

    Return value:
    size_t


    ErrorInfo::getMessage - Get Error Message


    inline const std::string& getMessage() const;
    Returns a text representation of the error code.




    ErrorInfo::operator != - Not-Equal Comparison


    inline bool operator !=(const ErrorInfo& e) const;

    Parameters:
    ParameterDescription
    const ErrorInfo& e

    Return value:
    bool


    ErrorInfo::operator =


    const ErrorInfo& operator =(const ErrorInfo& e);



    ErrorInfo::operator ==


    bool operator ==(const ErrorInfo& e) const;



    Variable Member Descriptions:


    ErrorInfo::mCode -

    int mCode;

    ErrorInfo::mFile -

    char* mFile;

    ErrorInfo::mInfo -

    std::string mInfo;

    ErrorInfo::mLibrary -

    int mLibrary;

    ErrorInfo::mLine -

    size_t mLine;

    ErrorInfo::mMsg -

    std::string mMsg;