From a06e3d97145f5a79eb8845b5944472af9c289ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 5 Feb 2013 14:57:38 +0100 Subject: [PATCH] Clarify error message of logposterior DLL for purely backward/forward models --- mex/sources/estimation/logposterior.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mex/sources/estimation/logposterior.cc b/mex/sources/estimation/logposterior.cc index 7341fc4bc..a3298cbef 100644 --- a/mex/sources/estimation/logposterior.cc +++ b/mex/sources/estimation/logposterior.cc @@ -121,7 +121,9 @@ logposterior(VEC1 &estParams, const MatrixConstView &data, std::vector zeta_fwrd, zeta_back, zeta_mixed, zeta_static; const mxArray *lli_mx = mxGetField(M_, 0, "lead_lag_incidence"); MatrixConstView lli(mxGetPr(lli_mx), mxGetM(lli_mx), mxGetN(lli_mx), mxGetM(lli_mx)); - if (lli.getRows() != 3 || lli.getCols() != n_endo) + if (lli.getRows() != 3) + throw LogposteriorMexErrMsgTxtException("Purely backward or purely forward models are not supported"); + if (lli.getCols() != n_endo) throw LogposteriorMexErrMsgTxtException("Incorrect lead/lag incidence matrix"); for (size_t i = 0; i < n_endo; i++)