コード例 #1
0
ファイル: ncbiexpt.cpp プロジェクト: swuecho/igblast
void CExceptionReporter::ReportDefaultEx(int err_code, int err_subcode,
    const CDiagCompileInfo& info, const string& title,const exception& ex,
    TDiagPostFlags flags)
{
    if ( !sm_DefEnabled )
        return;

    const CException* cex = dynamic_cast<const CException*>(&ex);
    auto_ptr<CException> wrapper;
    if ( !cex ) {
        wrapper.reset(new CExceptionWrapper(info, ex));
        cex = wrapper.get();
    }
    if ( sm_DefHandler ) {
        sm_DefHandler->Report(info.GetFile(),
                              info.GetLine(),
                              title,
                              *cex,
                              flags);
    } else {
        CNcbiDiag d(info, cex->GetSeverity(), flags);
        d << ErrCode(err_code, err_subcode);
        if ((err_code==0 && err_subcode==0) || d.CheckFilters()) {
            d << title << *cex;
        } else {
            Reset(d);
        }
    }
}
コード例 #2
0
ファイル: srv_lib.hpp プロジェクト: jackgopack4/pico-blast
 CNcbiDiag(const CDiagCompileInfo& info, EDiagSev sev, TDiagPostFlags flags = 0)
 {
     StartOldStyle(info.GetFile(), info.GetLine(), info.GetFunction().c_str());
     if (sev == eDiag_Trace)
         operator<< (Trace);
     else
         operator<< (EOldStyleSeverity(int(sev) - 1));
 }
コード例 #3
0
ファイル: ncbiexpt.cpp プロジェクト: swuecho/igblast
void CException::Report(const CDiagCompileInfo& info,
                        const string& title,CExceptionReporter* reporter,
                        TDiagPostFlags flags) const
{
    if (reporter) {
        reporter->Report(info.GetFile(), info.GetLine(), title, *this, flags);
    }
    // unconditionally ...
    // that is, there will be two reports
    CExceptionReporter::ReportDefault(info, title, *this, flags);
}
コード例 #4
0
ファイル: ncbiexpt.cpp プロジェクト: swuecho/igblast
void CException::x_Init(const CDiagCompileInfo& info,const string& message,
                        const CException* prev_exception, EDiagSev severity)
{
    m_Severity = severity;
    m_File     = info.GetFile();
    m_Line     = info.GetLine();
    m_Module   = info.GetModule();
    m_Class    = info.GetClass();
    m_Function = info.GetFunction();
    m_Msg      = message;
    if (!m_Predecessor && prev_exception) {
        m_Predecessor = prev_exception->x_Clone();
    }
    x_GetStackTrace();
}