From bf6454dccc6f8b8d8d36ca1abc228b1d609f6a62 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 25 Jan 2022 13:01:57 +0100 Subject: [PATCH] throw error if created-eh has not been registered Signed-off-by: Nikolaj Bjorner --- src/smt/theory_user_propagator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/smt/theory_user_propagator.cpp b/src/smt/theory_user_propagator.cpp index 06422cbf0..03ee6b687 100644 --- a/src/smt/theory_user_propagator.cpp +++ b/src/smt/theory_user_propagator.cpp @@ -218,8 +218,9 @@ bool theory_user_propagator::internalize_term(app* term) { unsigned v = add_expr(term); - if (m_created_eh) - m_created_eh(m_user_context, this, term, v); + if (!m_created_eh) + throw default_exception("You have to register a created event handler for new terms"); + m_created_eh(m_user_context, this, term, v); return true; }