summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pexception.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/pexception.h')
-rw-r--r--src/lib/netlist/plib/pexception.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/netlist/plib/pexception.h b/src/lib/netlist/plib/pexception.h
index 7317a320e28..f237f06e759 100644
--- a/src/lib/netlist/plib/pexception.h
+++ b/src/lib/netlist/plib/pexception.h
@@ -13,13 +13,22 @@
#include <exception>
+#define passert_always(expr) \
+ ((expr) ? static_cast<void>(0) : plib::passert_fail (#expr, __FILE__, __LINE__, nullptr))
+
+#define passert_always_msg(expr, msg) \
+ ((expr) ? static_cast<void>(0) : plib::passert_fail (#expr, __FILE__, __LINE__, msg))
+
namespace plib {
/// \brief Terminate the program.
///
/// \note could be enhanced by setting a termination handler
///
- [[noreturn]] void terminate(const pstring &msg) noexcept;
+ [[noreturn]] void terminate(const char *msg) noexcept;
+
+ [[noreturn]] void passert_fail(const char *assertion,
+ const char *file, int lineno, const char *msg) noexcept;
/// \brief throw an exception.
///