From 23ba2755301ed39dfe84754399c257efee7b5709 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Thu, 19 Jan 2017 15:41:36 -0500 Subject: [PATCH] k_order: catch any possible exception thrown. #1252 --- mex/sources/k_order_perturbation/k_order_perturbation.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mex/sources/k_order_perturbation/k_order_perturbation.cc b/mex/sources/k_order_perturbation/k_order_perturbation.cc index f2eb3f80da..99cc8ad9bf 100644 --- a/mex/sources/k_order_perturbation/k_order_perturbation.cc +++ b/mex/sources/k_order_perturbation/k_order_perturbation.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Dynare Team + * Copyright (C) 2008-2017 Dynare Team * * This file is part of Dynare. * @@ -347,6 +347,10 @@ extern "C" { strstrm << "dynare:k_order_perturbation: Caught general exception: " << e.message(); DYN_MEX_FUNC_ERR_MSG_TXT(strstrm.str().c_str()); } + catch (...) + { + DYN_MEX_FUNC_ERR_MSG_TXT("dynare:k_order_perturbation: Caught undefined exception."); + } plhs[0] = mxCreateDoubleScalar(0); } // end of mexFunction() } // end of extern C -- GitLab