1
// $Id: assert.C,v 1.1 2004/01/12 13:28:05 arnaud02 Exp $ -*- C++ -*-
2
// Function for custom implementation of assert.
4
// Copyright (C) 2004 Free Software Foundation, USA.
5
// Written by Arnaud Desitter.
7
// This file is part of DDD.
9
// DDD is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU General Public
11
// License as published by the Free Software Foundation; either
12
// version 2 of the License, or (at your option) any later version.
14
// DDD is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
// See the GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public
20
// License along with DDD -- see the file COPYING.
21
// If not, write to the Free Software Foundation, Inc.,
22
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
// DDD is the data display debugger.
25
// For details, see the DDD World-Wide-Web page,
26
// `http://www.gnu.org/software/ddd/',
27
// or send a mail to the DDD developers <ddd@gnu.org>.
33
void ddd_assert_fail (const char *assertion, const char *file,
34
unsigned int line, const char *function) {
35
if ( function != NULL )
36
std::cerr << "\n" << file << ": In function `" << function << "':";
37
std::cerr << "\n" << file << ":" << line
38
<< ": assertion `" << assertion << "' failed\n";