// Exception.cpp: implementation of the Exception class. // ////////////////////////////////////////////////////////////////////// #include #include #include "Exception.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Exception::Exception(int errorCode, const char * str_, ...) { this->errorCode = errorCode; va_list arglist; va_start(arglist, str_); _vsnprintf(errorMessage, MAX_EXCEPTION_LENGTH-1, str_, arglist); va_end(arglist); errorMessage[MAX_EXCEPTION_LENGTH-1] = '\0'; } Exception::~Exception() { } int Exception::ErrorCode() { return errorCode; } char * Exception::ErrorMessage() { return errorMessage; }