Improve error message.
parent
a3b249c375
commit
7583790851
|
@ -99,7 +99,7 @@ for it = initialconditions.nobs+(1:samplesize)
|
||||||
error('Nonlinear solver routine failed with errorcode=%i in period %i.', errorcode, it)
|
error('Nonlinear solver routine failed with errorcode=%i in period %i.', errorcode, it)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
catch
|
catch Error
|
||||||
DynareOutput.endo_simul = DynareOutput.endo_simul(:, 1:it-1);
|
DynareOutput.endo_simul = DynareOutput.endo_simul(:, 1:it-1);
|
||||||
dprintf('Newton failed on iteration i = %s.', num2str(it-initialconditions.nobs));
|
dprintf('Newton failed on iteration i = %s.', num2str(it-initialconditions.nobs));
|
||||||
ytm = DynareOutput.endo_simul(:,end);
|
ytm = DynareOutput.endo_simul(:,end);
|
||||||
|
@ -161,6 +161,10 @@ for it = initialconditions.nobs+(1:samplesize)
|
||||||
display_names_of_problematic_equations(DynareModel, eqtags, residuals_evaluating_to_complex);
|
display_names_of_problematic_equations(DynareModel, eqtags, residuals_evaluating_to_complex);
|
||||||
skipline()
|
skipline()
|
||||||
end
|
end
|
||||||
|
dprintf('Newton failed in period %s with the following error message:', char(initialconditions.lastdate+(it-initialconditions.nobs)));
|
||||||
|
skipline()
|
||||||
|
dprintf('\t %s', Error.message);
|
||||||
|
skipline()
|
||||||
break
|
break
|
||||||
% TODO Implement same checks with the jacobian matrix.
|
% TODO Implement same checks with the jacobian matrix.
|
||||||
% TODO Modify other solvers to return an exitflag.
|
% TODO Modify other solvers to return an exitflag.
|
||||||
|
|
Loading…
Reference in New Issue