From a6b5d40d4bca8e11404c81e4f69f3017bb8e6b19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 24 Jun 2022 17:03:18 +0200
Subject: [PATCH] Pac{Expectation,TargetNonstationary}Node::writeOutput():
 error out for non-LaTeX, as for VarExpectationNode

---
 src/ExprNode.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index a295ba11..de9fabb2 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -8592,6 +8592,9 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
       output << "PAC_EXPECTATION" << LEFT_PAR(output_type) << model_name << RIGHT_PAR(output_type);
       return;
     }
+
+  cerr << "PacExpectationNode::writeOutput not implemented for non-LaTeX." << endl;
+  exit(EXIT_FAILURE);
 }
 
 int
@@ -8679,6 +8682,9 @@ PacTargetNonstationaryNode::writeOutput(ostream &output, ExprNodeOutputType outp
       output << "PAC_TARGET_NONSTATIONARY" << LEFT_PAR(output_type) << model_name << RIGHT_PAR(output_type);
       return;
     }
+
+  cerr << "PacTargetNonstationaryNode::writeOutput not implemented for non-LaTeX." << endl;
+  exit(EXIT_FAILURE);
 }
 
 int
-- 
GitLab