| 1 |
sf-pippijn |
1.1 |
/* assert.cc |
| 2 |
|
|
* This file is part of ncursesxx library |
| 3 |
|
|
* Copyright (c) 2003,2004 by Stanislav Ievlev |
| 4 |
|
|
* |
| 5 |
|
|
* This file is covered by the GNU Library General Public License, |
| 6 |
|
|
* which should be included with libncursesxx as the file COPYING. |
| 7 |
|
|
*/ |
| 8 |
|
|
#include <sstream> |
| 9 |
|
|
#include <stdexcept> |
| 10 |
|
|
|
| 11 |
|
|
#include <ncurses/assert.hh> |
| 12 |
|
|
|
| 13 |
|
|
void |
| 14 |
|
|
ncurses::make_ncurses_assert (char const *expr, char const *file, int line) |
| 15 |
|
|
{ |
| 16 |
|
|
std::ostringstream ost; |
| 17 |
|
|
|
| 18 |
|
|
ost << "Assertion '" << expr << "'" << std::endl; |
| 19 |
|
|
ost << "failed at file:" << file << ":" << line; |
| 20 |
|
|
|
| 21 |
|
|
throw runtime_error (ost.str ()); |
| 22 |
|
|
} |