2007-10-20 01:35:48 +02:00
|
|
|
// stdafx.cpp : source file that includes just the standard includes
|
|
|
|
// db.pch will be the pre-compiled header
|
|
|
|
// stdafx.obj will contain the pre-compiled type information
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
// TODO: reference any additional headers you need in STDAFX.H
|
|
|
|
// and not in this file
|
|
|
|
|
|
|
|
struct MyAsserts {
|
|
|
|
MyAsserts() {
|
|
|
|
|
|
|
|
}
|
|
|
|
} myassertsstdafx;
|
2008-02-10 22:28:48 +01:00
|
|
|
|
|
|
|
#undef assert
|
|
|
|
|
|
|
|
#undef yassert
|
|
|
|
#include "assert.h"
|
|
|
|
|
2008-04-25 23:24:27 +02:00
|
|
|
void sayDbContext(const char *p = 0);
|
2008-02-10 22:28:48 +01:00
|
|
|
|
2008-02-14 18:50:13 +01:00
|
|
|
void wasserted(const char *msg, const char *file, unsigned line) {
|
2008-04-25 23:24:27 +02:00
|
|
|
problem() << "Assertion failure " << msg << ' ' << file << ' ' << line << endl;
|
2008-02-10 22:28:48 +01:00
|
|
|
cout << "Assertion failure " << msg << endl;
|
|
|
|
cout << ' ' << file << ' ' << line << endl;
|
|
|
|
sayDbContext();
|
2008-02-14 18:50:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void asserted(const char *msg, const char *file, unsigned line) {
|
|
|
|
wasserted(msg, file, line);
|
2008-02-10 22:28:48 +01:00
|
|
|
throw AssertionException();
|
|
|
|
}
|