16template <
typename T>
class QList;
24#define _FILEINFO_ Isis::FileName(__FILE__).name().toStdString().c_str(),__LINE__
160 IException(ErrorType type,
const char *message,
161 const char *fileName,
int lineNumber);
163 IException(ErrorType type,
const std::string &message,
164 const char *fileName,
int lineNumber);
166 IException(ErrorType type,
const QString &message,
167 const char *fileName,
int lineNumber);
170 ErrorType newExceptionType,
const char *message,
171 const char *fileName,
int lineNumber);
174 ErrorType newExceptionType,
const std::string &message,
175 const char *fileName,
int lineNumber);
178 ErrorType newExceptionType,
const QString &message,
179 const char *fileName,
int lineNumber);
185 const
char *
what() const throw();
192 void print(
bool printFileInfo) const;
195 QString
toString(
bool printFileInfo) const;
ErrorType
Contains a set of exception error types.
@ Unknown
A type of error that cannot be classified as any of the other error types.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
@ Programmer
This error is for when a programmer made an API call that was illegal.
@ Io
A type of error that occurred when performing an actual I/O operation.
QString * m_message
The message associated with this exception.
IException()
The default constructor creates an IException instance with no message, previous exceptions,...
int m_lineNumber
The line in the source code file that threw this exception.
static QString errorTypeToString(ErrorType t)
Returns the source of the error in string format for the given ErrorType.
const char * what() const
Returns a string representation of this exception in its current state.
char * m_what
This is used to store the return value of what() in a way that guarantees the returned data will not ...
ErrorType errorType() const
Returns the source of the error for this exception.
QString toString() const
Returns a string representation of this exception.
QList< IException > * m_previousExceptions
A list of exceptions that caused this exception.
ErrorType m_errorType
This exception's error source.
void append(const IException &exceptionSource)
Appends the given exception (and its list of previous exceptions) to this exception's causational exc...
void print() const
Prints a string representation of this exception to stderr.
Pvl toPvl() const
Returns a PVL object representing the contents of this exception.
char * buildWhat() const
Returns a C string containing a string representation of this exception.
~IException()
The destructor frees memory allocated for the message, filename, and list of previous exceptions.
void deleteEmptyMemberStrings()
This is a helper method for the constructors.
static ErrorType stringToErrorType(const QString &s)
Given a string, returns the error type associated with it.
QString * m_fileName
The source code file that threw this exception.
Container for cube-like labels.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.