Loading...
Searching...
No Matches
GlfException Class Reference

GlfException objects should be thrown by functions that operate on Glf files for exceptions. More...

`#include <GlfException.h>`

Inheritance diagram for GlfException:
[legend]
Collaboration diagram for GlfException:
[legend]

## Public Member Functions

| GlfException ()
| Constructor that sets the exception to a default status and error message.
| GlfException (const std::string &what_arg)
| Constructor that sets the exception to a default status and the specified error message.
| GlfException (GlfStatus::Status status, const std::string &errorMsg)
| Constructor that sets the exception to the specified status and error message.
| GlfException (const GlfStatus &status)
| Constructor that sets the exception to the specified status.
virtual const char * | what () const throw ()
| Returns the error message of this exception.

## Detailed Description

GlfException objects should be thrown by functions that operate on Glf files for exceptions.

Definition at line 27 of file GlfException.h.

## Constructor & Destructor Documentation

## GlfException() [1/4]

GlfException::GlfException | ( |  | ) |

Constructor that sets the exception to a default status and error message.

Definition at line 20 of file GlfException.cpp.

: myStatus()
{
myStatus.setStatus(GlfStatus::UNKNOWN, "Failed operating on a GLF.");
}
GlfStatus::setStatus
void setStatus(Status newStatus, const char *newMessage)
Set the status with the specified values.
Definition GlfStatus.cpp:74
GlfStatus::UNKNOWN
@ UNKNOWN
unknown result (default value should never be used)
Definition GlfStatus.h:33

References GlfStatus::setStatus(), and GlfStatus::UNKNOWN.

## GlfException() [2/4]

GlfException::GlfException | ( | const std::string & | what_arg | ) |

Constructor that sets the exception to a default status and the specified error message.

Parameters

  what_arg | error message associated with this exception.

Definition at line 27 of file GlfException.cpp.

: myStatus()
{
myStatus.setStatus(GlfStatus::UNKNOWN, errorMsg.c_str());
}

References GlfStatus::setStatus(), and GlfStatus::UNKNOWN.

## GlfException() [3/4]

GlfException::GlfException | ( | GlfStatus::Status | status,
|  | const std::string & | errorMsg
| ) |  |

Constructor that sets the exception to the specified status and error message.

Parameters

  status | glf status associated with this exception.
  errorMsg | error message associated with this exception.

Definition at line 33 of file GlfException.cpp.

: myStatus()
{
myStatus.setStatus(status, errorMsg.c_str());
}

References GlfStatus::setStatus().

## GlfException() [4/4]

GlfException::GlfException | ( | const GlfStatus & | status | ) |

Constructor that sets the exception to the specified status.

Parameters

  status | glf status associated with this exception.

Definition at line 40 of file GlfException.cpp.

: myStatus()
{
myStatus.addError(status);
}
GlfStatus::addError
void addError(Status newStatus, const char *newMessage)
Adds the specified error message to the status message, setting the status to newStatus if the curren...
Definition GlfStatus.cpp:85

References GlfStatus::addError().

## ~GlfException()

GlfException::~GlfException | ( |  | ) |
throw | ( |
| ) |  |

virtual

Definition at line 46 of file GlfException.cpp.

{
}

## Member Function Documentation

## what()

const char * GlfException::what | ( |  | ) | const
throw | ( |
| ) |  |

virtual

Returns the error message of this exception.

Returns
  errror message

Definition at line 50 of file GlfException.cpp.

{
return(myStatus.getStatusMessage());
}
GlfStatus::getStatusMessage
const char * getStatusMessage() const
Return the status message.
Definition GlfStatus.cpp:125

References GlfStatus::getStatusMessage().

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

- glf/GlfException.h
- glf/GlfException.cpp