Source
/** Accessor to the severity level, in the form of a std::string, of the error which has just been declared
/*******************************************************************************
* ALMA - Atacama Large Millimiter Array
* (c) Instituto de Estructura de la Materia, 2009
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* "@(#) $Id: ATMError.h Exp $"
*
* who when what
* -------- -------- ----------------------------------------------
* pardo 24/03/09 created
*/
ATM_NAMESPACE_BEGIN
/** Definition of the sequence of error levels sorted by ascending severity.
*/
enum ErrorLevel
{
NOERROR = 0,
WARNING,
MINOR,
SERIOUS,
FATAL
};
/** The Error class represents a list of exceptions that may happen when errors occur.
To every error is associated a severity level. There is at any time an acceptable level
of severity. If an error occurs at that level or a more severe level, an exception is thrown.
The critical level of severity below which errors are tolerated can be modified.
*/
class Error
{
public:
Error();
Error(ErrorLevel errlev);
/** Declare the occurrence of an error
* @pre the default level of tolerance for an acceptable error is used or a different critical
* level has been set.