Commit d11e9a52 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

abort macro

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1112
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 01927b40
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: error.cc,v 1.2 2002-11-27 13:20:04 forbrig Exp $
* $Id: error.cc,v 1.3 2002-11-27 16:16:54 forbrig Exp $
* \author Thomas Forbriger
* \date 27/11/2002
*
......@@ -19,7 +19,7 @@
#define TF_ERROR_CC_VERSION \
"TF_ERROR_CC V1.0 "
#define TF_ERROR_CC_CVSID \
"$Id: error.cc,v 1.2 2002-11-27 13:20:04 forbrig Exp $"
"$Id: error.cc,v 1.3 2002-11-27 16:16:54 forbrig Exp $"
#include <iostream>
#include <tfxx/error.h>
......@@ -49,6 +49,13 @@ namespace error {
Mmessage(message), Mfile(NULL), Mline(0), Mcondition(condition)
{ if (Mreport_on_construct) { report(); } }
//! construct with message and file info
Exception::Exception(const char* message,
const char* file,
const int& line);
Mmessage(message), Mfile(file), Mline(line), Mcondition(NULL)
{ if (Mreport_on_construct) { report(); } }
//! construct with message and file info and condition
Exception::Exception(const char* message,
const char* file,
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: error.h,v 1.2 2002-11-27 13:20:04 forbrig Exp $
* $Id: error.h,v 1.3 2002-11-27 16:16:54 forbrig Exp $
* \author Thomas Forbriger
* \date 27/11/2002
*
......@@ -23,7 +23,7 @@
#define TF_ERROR_H_VERSION \
"TF_ERROR_H V1.0 "
#define TF_ERROR_H_CVSID \
"$Id: error.h,v 1.2 2002-11-27 13:20:04 forbrig Exp $"
"$Id: error.h,v 1.3 2002-11-27 16:16:54 forbrig Exp $"
namespace tfxx {
......@@ -65,6 +65,10 @@ namespace error {
const char* file,
const int& line,
const char* condition);
//! Create with message and code position
Exception(const char* message,
const char* file,
const int& line);
//! Screen report
virtual void report() const;
//! Issue a screen report on construction of exception
......@@ -113,6 +117,15 @@ namespace error {
*/
#define TFXX_assert(C,M) TFXX_Xassert( C , M , tfxx::error::Exception )
/*! \brief Abort and give a message
*
* \ingroup group_error
* \param M message of type char*
* \param E exception class to throw
*/
#define TFXX_abort(M,E) \
throw( tfxx::error::Exception ( M , __FILE__, __LINE__ ))
#endif // TF_ERROR_H_VERSION (includeguard)
/* ----- END OF error.h ----- */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment