diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index e7b98e0189c61daca6ee134875b109881498a08b..6e71fde250a6f4182d8a60b01581cee232712ed4 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2007-2024 Dynare Team
+ * Copyright © 2007-2025 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -9640,11 +9640,11 @@ BinaryOpNode::matchComplementarityCondition(const optional<int>& heterogeneity_d
             || (!is_greater
                 && (barg1->op_code == BinaryOpcode::less
                     || barg1->op_code == BinaryOpcode::lessEqual)))))
-    throw MatchFailureException {"Complementarity condition does not have the right form"};
+    throw MatchFailureException {};
 
   auto id = match_contemporaneous_endogenous(barg1->arg2);
   if (!id)
-    throw MatchFailureException {"Complementarity condition does not have the right form"};
+    throw MatchFailureException {};
   check_bound_constant(barg1->arg1);
   check_bound_constant(arg2);
 
diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc
index 26a70bc087251f73d385b655c97f96845bea3273..abbbf4680a9ba0aea3af6a0781cffa18f04e6629 100644
--- a/src/ParsingDriver.cc
+++ b/src/ParsingDriver.cc
@@ -2770,7 +2770,8 @@ ParsingDriver::add_model_equal(expr_t arg1, expr_t arg2, map<string, string> eq_
       }
     catch (ExprNode::MatchFailureException& e)
       {
-        error("Complementarity condition has an incorrect form: " + e.message);
+        error("Complementarity condition has an incorrect form"s
+              + (e.message.empty() ? ""s : ": "s + e.message));
       }
 
   if (eq_tags.contains("static"))