Blame InternalErr.h

Packit a4aae4
Packit a4aae4
// -*- mode: c++; c-basic-offset:4 -*-
Packit a4aae4
Packit a4aae4
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
Packit a4aae4
// Access Protocol.
Packit a4aae4
Packit a4aae4
// Copyright (c) 2002,2003 OPeNDAP, Inc.
Packit a4aae4
// Author: James Gallagher <jgallagher@opendap.org>
Packit a4aae4
//
Packit a4aae4
// This library is free software; you can redistribute it and/or
Packit a4aae4
// modify it under the terms of the GNU Lesser General Public
Packit a4aae4
// License as published by the Free Software Foundation; either
Packit a4aae4
// version 2.1 of the License, or (at your option) any later version.
Packit a4aae4
//
Packit a4aae4
// This library is distributed in the hope that it will be useful,
Packit a4aae4
// but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a4aae4
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a4aae4
// Lesser General Public License for more details.
Packit a4aae4
//
Packit a4aae4
// You should have received a copy of the GNU Lesser General Public
Packit a4aae4
// License along with this library; if not, write to the Free Software
Packit a4aae4
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit a4aae4
//
Packit a4aae4
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
Packit a4aae4
Packit a4aae4
// (c) COPYRIGHT URI/MIT 1999
Packit a4aae4
// Please read the full copyright statement in the file COPYRIGHT_URI.
Packit a4aae4
//
Packit a4aae4
// Authors:
Packit a4aae4
//      jhrg,jimg       James Gallagher <jgallagher@gso.uri.edu>
Packit a4aae4
Packit a4aae4
// Interface for the InternalErr class
Packit a4aae4
//
Packit a4aae4
// 5/3/99 jhrg
Packit a4aae4
Packit a4aae4
#ifndef _internalerr_h
Packit a4aae4
#define _internalerr_h 1
Packit a4aae4
Packit a4aae4
Packit a4aae4
#include <string>
Packit a4aae4
Packit a4aae4
#ifndef _error_h
Packit a4aae4
#include "Error.h"
Packit a4aae4
#endif
Packit a4aae4
Packit a4aae4
namespace libdap
Packit a4aae4
{
Packit a4aae4
Packit a4aae4
Packit a4aae4
/** The InternalErr class is used to signal that somewhere inside libdap a
Packit a4aae4
    software fault was found. This class wraps the message text in some
Packit a4aae4
    boiler plate that asks the error be reported to us (tech support).
Packit a4aae4
Packit a4aae4
    NB: This class Adds some text to the message and might, in the future,
Packit a4aae4
    hold information not also held in Error. However, all Error objects
Packit a4aae4
    thrown on the server-side of libdap that cannot be resolved (and that's all
Packit a4aae4
    of them for now, 5/3/99 jhrg) will be sent to the client-side using
Packit a4aae4
    Error objects. That is, the information recorded in an InternalErr
Packit a4aae4
    object will be sent by calling the <tt>print(...)</tt> mfunc of Error.
Packit a4aae4
Packit a4aae4
    @brief A class for software fault reporting.
Packit a4aae4
    @author jhrg */
Packit a4aae4
Packit a4aae4
class InternalErr: public Error
Packit a4aae4
{
Packit a4aae4
Packit a4aae4
public:
Packit a4aae4
    /** These constructors always set the error code to <tt>internal_error</tt>.
Packit a4aae4
Packit a4aae4
    Note that there is no way to specify an error correction program for
Packit a4aae4
    an internal error.
Packit a4aae4
Packit a4aae4
    @brief Constructors for the Error object
Packit a4aae4
    @name Constructors */
Packit a4aae4
    //@{
Packit a4aae4
    ///
Packit a4aae4
    InternalErr(const string &msg;;
Packit a4aae4
    ///
Packit a4aae4
    InternalErr(const string &file, const int &line, const string &msg;;
Packit a4aae4
    ///
Packit a4aae4
    InternalErr();
Packit a4aae4
    ///
Packit a4aae4
    InternalErr(const InternalErr &copy_from);
Packit a4aae4
    //@}
Packit a4aae4
Packit a4aae4
    virtual ~InternalErr();
Packit a4aae4
Packit a4aae4
    bool OK();
Packit a4aae4
};
Packit a4aae4
Packit a4aae4
} // namespace libdap
Packit a4aae4
Packit a4aae4
#endif // _internalerr_h