diff --git a/matlab/@dprior/admissible.m b/matlab/@dprior/admissible.m
index c3a46c36b530869d61968a2e878a60382dbcc1c2..82cce25f3ef61198f7d6dee7ecd6acd9d44d991f 100644
--- a/matlab/@dprior/admissible.m
+++ b/matlab/@dprior/admissible.m
@@ -133,7 +133,7 @@ try
     for i = 1:ndraws
         draw = o.draw();
         if ~o.admissible(draw)
-            error()
+            error('problem in admissible')
         end
     end
     t(1) = true;
diff --git a/matlab/distributions/mode_and_variance_to_mean.m b/matlab/distributions/mode_and_variance_to_mean.m
index e4a892829bb2d50eb8d7270a3e22c3d837fafcdf..1d7f6729ab015f009b1ecadcf881e8e6cc6baa1d 100644
--- a/matlab/distributions/mode_and_variance_to_mean.m
+++ b/matlab/distributions/mode_and_variance_to_mean.m
@@ -177,8 +177,7 @@ if (distribution==4)% Beta distribution
     if length(idx)>1
         error('Multiplicity of solutions for the beta distribution specification.')
     elseif isempty(idx)
-        disp('No solution for the beta distribution specification. You should reduce the variance.')
-        error();
+        error('No solution for the beta distribution specification. You should reduce the variance.')
     end
     alpha = real_roots(idx);
     beta = ((1-m)*alpha+2*m-1)/m;
diff --git a/matlab/estimation/dsge_simulated_theoretical_correlation.m b/matlab/estimation/dsge_simulated_theoretical_correlation.m
index 5d2ed379d42a871f0049e17c43cdec37a5608424..d874cb54ba08fc185ebb176db849ec2b86259604 100644
--- a/matlab/estimation/dsge_simulated_theoretical_correlation.m
+++ b/matlab/estimation/dsge_simulated_theoretical_correlation.m
@@ -44,6 +44,5 @@ if strcmpi(type,'posterior')
 elseif strcmpi(type,'prior')
     CorrFileNumber = length(dir([M_.dname '/prior/moments/' M_.fname '_PriorCorrelations*']));
 else
-    disp('dsge_simulated_theoretical_correlation:: Unknown type!');
-    error()
+    error('dsge_simulated_theoretical_correlation:: Unknown type!');
 end
diff --git a/matlab/estimation/dsge_simulated_theoretical_covariance.m b/matlab/estimation/dsge_simulated_theoretical_covariance.m
index 62cbcabd495687e8b2b7955427d882c84e3d27c8..31d5a1486d1bde18d5a08919e70948af9db42303 100644
--- a/matlab/estimation/dsge_simulated_theoretical_covariance.m
+++ b/matlab/estimation/dsge_simulated_theoretical_covariance.m
@@ -44,8 +44,7 @@ elseif strcmpi(type,'prior')
     CheckPath('prior/moments',M_.dname);
     posterior = 0;
 else
-    disp('dsge_simulated_theoretical_covariance:: Unknown type!')
-    error();
+    error('dsge_simulated_theoretical_covariance:: Unknown type!')
 end
 
 %delete old stale files before creating new ones
diff --git a/matlab/estimation/dsge_simulated_theoretical_variance_decomposition.m b/matlab/estimation/dsge_simulated_theoretical_variance_decomposition.m
index 57e6508cdb4faa1b90a5f8238effcab843f0d707..880b27438fd24c358c264befc21dd5e356e41381 100644
--- a/matlab/estimation/dsge_simulated_theoretical_variance_decomposition.m
+++ b/matlab/estimation/dsge_simulated_theoretical_variance_decomposition.m
@@ -46,8 +46,7 @@ elseif strcmpi(type,'prior')
     CheckPath('prior/moments',M_.dname);
     posterior = 0;
 else
-    disp('dsge_simulated_theoretical_variance_decomposition:: Unknown type!')
-    error()
+    error('dsge_simulated_theoretical_variance_decomposition:: Unknown type!')
 end
 
 %delete old stale files before creating new ones
diff --git a/tests/write/example1.mod b/tests/write/example1.mod
index 8ba9f85a37ec9ea1c49e252757f1a8877e820d81..889dd5e30d2db684f1de20c9272a55a6c4abf83c 100644
--- a/tests/write/example1.mod
+++ b/tests/write/example1.mod
@@ -84,6 +84,6 @@ end;
 
 verbatim;
   if ~isequal(M_.observed_exo_names, {'ey'; 'ex'})
-    error()
+    error('Arguments are not identical')
   end
 end;