aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_rpc_json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_rpc_json.cpp')
-rw-r--r--src/modules/m_rpc_json.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp
index 563ca627c..4bcb3ba08 100644
--- a/src/modules/m_rpc_json.cpp
+++ b/src/modules/m_rpc_json.cpp
@@ -135,6 +135,10 @@ throw_msg_unless_internal (char const *file, int line, char const *function, cha
throw std::runtime_error (buf);
}
+#define throw_unreachable unreachable_internal (__FILE__, __LINE__, CURFUNC)
+#define throw_unless(condition) if (!expect_false (condition)) throw_unless_internal (__FILE__, __LINE__, CURFUNC, #condition)
+#define throw_msg_unless(condition, message) if (!expect_false (condition)) throw_msg_unless_internal (__FILE__, __LINE__, CURFUNC, message)
+
namespace json
{