30 template <
typename T>
class QList;
38 #define _FILEINFO_ __FILE__,__LINE__
169 const char *fileName,
int lineNumber);
172 const char *fileName,
int lineNumber);
175 const char *fileName,
int lineNumber);
178 ErrorType newExceptionType,
const char *message,
179 const char *fileName,
int lineNumber);
182 ErrorType newExceptionType,
const std::string &message,
183 const char *fileName,
int lineNumber);
186 ErrorType newExceptionType,
const QString &message,
187 const char *fileName,
int lineNumber);
193 const
char *
what() const throw();
199 void print(
bool printFileInfo) const;
202 QString
toString(
bool printFileInfo) const;
Pvl toPvl() const
Returns a PVL object representing the contents of this exception.
static IException createStackTrace()
Returns an IException representing the current stack, excluding this method.
~IException()
The destructor frees memory allocated for the message, filename, and list of previous exceptions...
void append(const IException &exceptionSource)
Appends the given exception (and its list of previous exceptions) to this exception's causational exc...
ErrorType errorType() const
Returns the source of the error for this exception.
This error is for when a programmer made an API call that was illegal.
A type of error that occurred when performing an actual I/O operation.
const char * what() const
Returns a string representation of this exception in its current state.
int m_lineNumber
The line in the source code file that threw this exception.
ErrorType m_errorType
This exception's error source.
void print() const
Prints a string representation of this exception to stderr.
A type of error that could only have occurred due to a mistake on the user's part (e...
A type of error that cannot be classified as any of the other error types.
char * buildWhat() const
Returns a C string containing a string representation of this exception.
IException()
The default constructor creates an IException instance with no message, previous exceptions, or file info.
Container for cube-like labels.
void swap(IException &other)
Swaps the values of this instance's member data with other.
QString * m_fileName
The source code file that threw this exception.
ErrorType
Contains a set of exception error types.
static QString errorTypeToString(ErrorType t)
Returns the source of the error in string format for the given ErrorType.
QString toString() const
Returns a string representation of this exception.
static ErrorType stringToErrorType(const QString &s)
Given a string, returns the error type associated with it.
QString * m_message
The message associated with this exception.
void deleteEmptyMemberStrings()
This is a helper method for the constructors.
char * m_what
This is used to store the return value of what() in a way that guarantees the returned data will not ...
QList< IException > * m_previousExceptions
A list of exceptions that caused this exception.