⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stafexception.cpp

📁 Software Testing Automation Framework (STAF)的开发代码
💻 CPP
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2006                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/#include "STAFException.h"#include "STAFTrace.h"void STAFException::trace(const char *caughtWhere){    STAFException::trace(kSTAFTraceError, caughtWhere);}void STAFException::trace(unsigned int tracePoint, const char *caughtWhere){    char errorMsg[1080] = { 0 };    if (caughtWhere)    {        if (getLocation()[0] != 0)        {            sprintf(errorMsg, "Caught STAFException in %s, "                    "Exception: %s, Location: %s, Text: %s, Error code: %d",                    caughtWhere, getName(), getLocation(), getText(),                    getErrorCode());        }        else        {            sprintf(errorMsg, "Caught STAFException in %s, "                    "Exception: %s, Text: %s, Error code: %d",                    caughtWhere, getName(), getText(), getErrorCode());        }    }    else    {        if (getLocation()[0] != 0)        {            sprintf(errorMsg, "Caught STAFException, "                    "Exception: %s, Location: %s, Text: %s, Error code: %d",                    getName(), getLocation(), getText(), getErrorCode());        }        else        {            sprintf(errorMsg, "Caught STAFException, "                    "Exception: %s, Text: %s, Error code: %d",                    getName(), getText(), getErrorCode());        }    }    STAFTrace::trace(static_cast<STAFTracePoint_t>(tracePoint), errorMsg);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -