TF++, Miscellaneous classes and modules in C++:

exceptions and error handling macros (prototypes) More...

#include <stack>
Include dependency graph for error.h:

Go to the source code of this file.

Classes

class  tfxx::error::Exception
 Base class for exceptions. More...
 

Namespaces

 tfxx
 Namespace containing all code of library libtfxx.
 
 tfxx::error
 Error handling.
 

Macros

#define TF_ERROR_H_VERSION   "TF_ERROR_H V1.3"
 
#define TFXX_Xassert(C, M, E)   if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); }
 Check an assertion and report by throwing an exception. More...
 
#define TFXX_assert(C, M)   TFXX_Xassert( C , M , tfxx::error::Exception )
 Check an assertion and report by throwing an exception. More...
 
#define TFXX_abort(M)   throw( tfxx::error::Exception ( M , __FILE__, __LINE__ ))
 Abort and give a message. More...
 
#define TFXX_illegal   TFXX_abort("illegal call!")
 
#define TFXX_report_assert(C, M, V)
 Check an assertion and report only. More...
 
#define TFXX_nonfatal_assert(F, C, M, V)   if (F) { TFXX_report_assert(C,M,V) } else { TFXX_assert(C,M) }
 Macro to distinguish between fatal and non fatal assertions. More...
 

Functions

void tfxx::error::report_violation (const char *message, const char *file, const int &line, const char *condition)
 report violation of assertion More...
 
void tfxx::error::report_deprecated (const char *function, const char *reason)
 report deprecated function More...
 

Detailed Description

exceptions and error handling macros (prototypes)


Author
Thomas Forbriger
Date
27/11/2002

exceptions and error handling macros (prototypes)

Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

REVISIONS and CHANGES

  • 27/11/2002 V1.0 Thomas Forbriger
  • 28/04/2006 V1.1 provide explicit virtual destructor
  • 11/0/2007 V1.2 added a few macros
  • 10/06/2015 V1.3 add report violation and report deprecated functions copied from libdatrwxx

Definition in file error.h.