More Octave compatibility fixes wrt catch

time-shift
Sébastien Villemot 2013-11-08 16:35:52 +01:00
parent ecdbc42319
commit ea6ee19402
2 changed files with 5 additions and 3 deletions

View File

@ -96,9 +96,10 @@ if options_.use_calibration_initialization %set calibration as starting values
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
try
check_prior_bounds(xparam1,[bayestopt_.lb bayestopt_.ub],M_,estim_params_,options_,bayestopt_); %check whether calibration satisfies prior bounds
catch prior_bound_check_error
catch
e = lasterror();
fprintf('Cannot use parameter values from calibration as they violate the prior bounds.')
rethrow(prior_bound_check_error);
rethrow(e);
end
end

View File

@ -263,7 +263,8 @@ if fload==0,
if prepSA,
try
T=zeros(size(dr_.ghx,1),size(dr_.ghx,2)+size(dr_.ghu,2),Nsam);
catch ME
catch
ME = lasterror();
if strcmp('MATLAB:nomem',ME.identifier),
prepSA=0;
disp('The model is too large for storing state space matrices ...')