NCBI C++ ToolKit
cgi_exception.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cgi_exception.cpp 75898 2016-12-27 17:38:25Z grichenk $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Alexey Grichenko
27  *
28  * File Description: CGI exception implementation
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 #include <cgi/cgi_exception.hpp>
34 
36 
37 
39  const string& message,
40  const CException* prev_exception,
41  EDiagSev severity)
42 {
43  CException::x_Init(info, message, prev_exception, severity);
45 }
46 
47 
49 {
51  const CCgiException& cgi_src = dynamic_cast<const CCgiException&>(src);
52  m_StatusCode = cgi_src.m_StatusCode;
54 }
55 
56 
58 {
59  return code == eStatusNotSet ? "Status not set" :
61 }
62 
63 
Exception classes used by the NCBI CGI framework.
Incapsulate compile time information such as __FILE__, __LINE__, NCBI_MODULE, current function.
Definition: ncbidiag.hpp:65
virtual void x_Init(const CDiagCompileInfo &info, const string &message, const CException *prev_exception, EDiagSev severity) override
Override method for initializing exception data.
virtual void x_Assign(const CException &src) override
Override method for copying exception data.
string m_StatusMessage
static string GetStdStatusMessage(EStatusCode code)
EStatusCode m_StatusCode
EStatusCode
HTTP status codes.
@ eStatusNotSet
Internal value - code not set.
static string GetStdStatusMessage(ECode code)
EDiagSev
Severity level for the posted diagnostics.
Definition: ncbidiag.hpp:650
virtual void x_Init(const CDiagCompileInfo &info, const string &message, const CException *prev_exception, EDiagSev severity)
Helper method for initializing exception data.
Definition: ncbiexpt.cpp:509
virtual void x_Assign(const CException &src)
Helper method for copying exception data.
Definition: ncbiexpt.cpp:536
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static MDB_envinfo info
Definition: mdb_load.c:37
Definition: inftrees.h:24
Modified on Thu Dec 07 10:10:05 2023 by modify_doxy.py rev. 669887