void GException::AddErrorDetail(const char* szSystem, int error, ...) { int nSubSystem = 0; int nError = error; try { GProfile &ErrorProfile = GetErrorProfile(); nSubSystem = atoi(ErrorProfile.GetString(szSystem, "SubSystem")); GString strKey; strKey.Format("%ld", (int)error); strKey = ErrorProfile.GetString(szSystem, (const char *)strKey); GString strTemp; va_list argList; va_start(argList, error); strTemp.FormatV((const char *)strKey, argList); va_end(argList); GString strAddedToUserStack; strAddedToUserStack.Format("[Error %ld:%ld] %s\n", (int)nSubSystem, (int)nError, (const char *)strTemp); _ErrorDetail.AddLast(strAddedToUserStack); } catch (GException &e) { _subSystem = e._subSystem; _error = e._error; _strExceptionReason = e._strExceptionReason; return; } }