diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-28 01:15:24 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-28 01:15:24 +0000 |
| commit | ea81a192a65a03b664dac61de21e06cea7aa97a2 (patch) | |
| tree | f21447aeb9f24320ea6c1c4cb7a05539646bb85a /src/dcp_assert.h | |
| parent | 75788462338b1b4f464d075465da3cb372c40004 (diff) | |
Purge assert() from src/, at least (not asdcplib).
Diffstat (limited to 'src/dcp_assert.h')
| -rw-r--r-- | src/dcp_assert.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dcp_assert.h b/src/dcp_assert.h new file mode 100644 index 00000000..fa1ab8ea --- /dev/null +++ b/src/dcp_assert.h @@ -0,0 +1,22 @@ +/* + Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include "exceptions.h" + +#define DCP_ASSERT(x) if (!(x)) throw ProgrammingError (__FILE__, __LINE__); |
