changeset 20711:7b608fadc663

Make error messages more specific about the variable and problem encountered. * besselj.cc, bitfcns.cc, colloc.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, dirfns.cc, ellipj.cc, error.cc, gl-render.cc, graphics.cc, graphics.in.h, load-path.cc, lsode.cc, lu.cc, luinc.cc, oct-hist.cc, oct-obj.cc, octave-link.cc, quad.cc, rand.cc, symtab.cc, sysdep.cc, toplev.cc, utils.cc, variables.cc, __init_fltk__.cc, chol.cc, fftw.cc, ov-cell.cc, ov-ch-mat.cc, ov-class.cc, ov-classdef.cc, ov-cx-mat.cc, ov-fcn-inline.cc, ov-struct.cc, ov-usr-fcn.cc, CMatrix.cc, dMatrix.cc, fCMatrix.cc, fMatrix.cc, lo-specfun.cc, curl.m, divergence.m, __fltk_file_filter__.m, __uiobject_split_args__.m, uigetfile.m, doc.m, imshow.m, rref.m, subspace.m, edit.m, fileattrib.m, open.m, substruct.m, annotation.m, axis.m, caxis.m, datetick.m, hidden.m, legend.m, whitebg.m, colorbar.m, __add_datasource__.m, __ezplot__.m, __pie__.m, __plt_get_axis_arg__.m, pan.m, __print_parse_opts__.m, rotate3d.m, subplot.m, zoom.m, compan.m, addpref.m, getpref.m, setpref.m, powerset.m, bicg.m, bicgstab.m, cgs.m, qmr.m, spaugment.m, pascal.m, moment.m, cstrcat.m, system.tst: Make error messages more specific about the variable and problem encountered.
author Rik <rik@octave.org>
date Wed, 18 Nov 2015 10:40:26 -0800
parents 73800f39da6f
children 4a25c398ffa2
files libinterp/corefcn/besselj.cc libinterp/corefcn/bitfcns.cc libinterp/corefcn/colloc.cc libinterp/corefcn/daspk.cc libinterp/corefcn/dasrt.cc libinterp/corefcn/dassl.cc libinterp/corefcn/data.cc libinterp/corefcn/dirfns.cc libinterp/corefcn/ellipj.cc libinterp/corefcn/error.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h libinterp/corefcn/load-path.cc libinterp/corefcn/lsode.cc libinterp/corefcn/lu.cc libinterp/corefcn/luinc.cc libinterp/corefcn/oct-hist.cc libinterp/corefcn/oct-obj.cc libinterp/corefcn/octave-link.cc libinterp/corefcn/quad.cc libinterp/corefcn/rand.cc libinterp/corefcn/symtab.cc libinterp/corefcn/sysdep.cc libinterp/corefcn/toplev.cc libinterp/corefcn/utils.cc libinterp/corefcn/variables.cc libinterp/dldfcn/__init_fltk__.cc libinterp/dldfcn/chol.cc libinterp/dldfcn/fftw.cc libinterp/octave-value/ov-cell.cc libinterp/octave-value/ov-ch-mat.cc libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-cx-mat.cc libinterp/octave-value/ov-fcn-inline.cc libinterp/octave-value/ov-struct.cc libinterp/octave-value/ov-usr-fcn.cc liboctave/array/CMatrix.cc liboctave/array/dMatrix.cc liboctave/array/fCMatrix.cc liboctave/array/fMatrix.cc liboctave/numeric/lo-specfun.cc scripts/general/curl.m scripts/general/divergence.m scripts/gui/private/__fltk_file_filter__.m scripts/gui/private/__uiobject_split_args__.m scripts/gui/uigetfile.m scripts/help/doc.m scripts/image/imshow.m scripts/linear-algebra/rref.m scripts/linear-algebra/subspace.m scripts/miscellaneous/edit.m scripts/miscellaneous/fileattrib.m scripts/miscellaneous/open.m scripts/miscellaneous/substruct.m scripts/plot/appearance/annotation.m scripts/plot/appearance/axis.m scripts/plot/appearance/caxis.m scripts/plot/appearance/datetick.m scripts/plot/appearance/hidden.m scripts/plot/appearance/legend.m scripts/plot/appearance/whitebg.m scripts/plot/draw/colorbar.m scripts/plot/draw/private/__add_datasource__.m scripts/plot/draw/private/__ezplot__.m scripts/plot/draw/private/__pie__.m scripts/plot/util/__plt_get_axis_arg__.m scripts/plot/util/pan.m scripts/plot/util/private/__print_parse_opts__.m scripts/plot/util/rotate3d.m scripts/plot/util/subplot.m scripts/plot/util/zoom.m scripts/polynomial/compan.m scripts/prefs/addpref.m scripts/prefs/getpref.m scripts/prefs/setpref.m scripts/set/powerset.m scripts/sparse/bicg.m scripts/sparse/bicgstab.m scripts/sparse/cgs.m scripts/sparse/qmr.m scripts/sparse/spaugment.m scripts/special-matrix/pascal.m scripts/statistics/base/moment.m scripts/strings/cstrcat.m test/system.tst
diffstat 87 files changed, 319 insertions(+), 323 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/besselj.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/besselj.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -81,7 +81,7 @@
 static void
 gripe_bessel_arg (const char *fn, const char *arg)
 {
-  error ("%s: expecting scalar or matrix as %s argument", fn, arg);
+  error ("%s: %s argument must be a scalar or matrix", fn, arg);
 }
 
 octave_value_list
@@ -126,11 +126,11 @@
         {
           if (alpha_arg.is_scalar_type ())
             {
-              float alpha = args(0).xfloat_value ("%s: expecting scalar or matrix as first argument", fn);
+              float alpha = args(0).xfloat_value ("%s: ALPHA must be a scalar or matrix", fn);
 
               if (x_arg.is_scalar_type ())
                 {
-                  FloatComplex x = x_arg.xfloat_complex_value ("%s: expecting scalar or matrix as second argument", fn);
+                  FloatComplex x = x_arg.xfloat_complex_value ("%s: X must be a scalar or matrix", fn);
 
                   octave_idx_type ierr;
                   octave_value result;
@@ -145,7 +145,7 @@
               else
                 {
                   FloatComplexNDArray x
-                    = x_arg.xfloat_complex_array_value ("%s: expecting scalar or matrix as second argument", fn);
+                    = x_arg.xfloat_complex_array_value ("%s: X must be a scalar or matrix", fn);
 
                   Array<octave_idx_type> ierr;
                   octave_value result;
@@ -168,10 +168,10 @@
 
               if (args0_is_row_vector && args1_is_col_vector)
                 {
-                  FloatRowVector ralpha = args(0).xfloat_row_vector_value ("%s: expecting scalar or matrix as first argument", fn);
+                  FloatRowVector ralpha = args(0).xfloat_row_vector_value ("%s: ALPHA must be a scalar or matrix", fn);
 
                   FloatComplexColumnVector cx =
-                    x_arg.xfloat_complex_column_vector_value ("%s: expecting scalar or matrix as second argument", fn);
+                    x_arg.xfloat_complex_column_vector_value ("%s: X must be a scalar or matrix", fn);
 
                   Array<octave_idx_type> ierr;
                   octave_value result;
@@ -185,11 +185,11 @@
                 }
               else
                 {
-                  FloatNDArray alpha = args(0).xfloat_array_value ("%s: expecting scalar or matrix as first argument", fn);
+                  FloatNDArray alpha = args(0).xfloat_array_value ("%s: ALPHA must be a scalar or matrix", fn);
 
                   if (x_arg.is_scalar_type ())
                     {
-                      FloatComplex x = x_arg.xfloat_complex_value ("%s: expecting scalar or matrix as second argument", fn);
+                      FloatComplex x = x_arg.xfloat_complex_value ("%s: X must be a scalar or matrix", fn);
 
                       Array<octave_idx_type> ierr;
                       octave_value result;
@@ -204,7 +204,7 @@
                   else
                     {
                       FloatComplexNDArray x
-                        = x_arg.xfloat_complex_array_value ("%s: expecting scalar or matrix as second argument", fn);
+                        = x_arg.xfloat_complex_array_value ("%s: X must be a scalar or matrix", fn);
 
                       Array<octave_idx_type> ierr;
                       octave_value result;
@@ -223,11 +223,11 @@
         {
           if (alpha_arg.is_scalar_type ())
             {
-              double alpha = args(0).xdouble_value ("%s: expecting scalar or matrix as first argument", fn);
+              double alpha = args(0).xdouble_value ("%s: ALPHA must be a scalar or matrix", fn);
 
               if (x_arg.is_scalar_type ())
                 {
-                  Complex x = x_arg.xcomplex_value ("%s: expecting scalar or matrix as second argument", fn);
+                  Complex x = x_arg.xcomplex_value ("%s: X must be a scalar or matrix", fn);
 
                   octave_idx_type ierr;
                   octave_value result;
@@ -241,7 +241,7 @@
                 }
               else
                 {
-                  ComplexNDArray x = x_arg.xcomplex_array_value ("%s: expecting scalar or matrix as second argument", fn);
+                  ComplexNDArray x = x_arg.xcomplex_array_value ("%s: X must be a scalar or matrix", fn);
 
                   Array<octave_idx_type> ierr;
                   octave_value result;
@@ -264,10 +264,10 @@
 
               if (args0_is_row_vector && args1_is_col_vector)
                 {
-                  RowVector ralpha = args(0).xrow_vector_value ("%s: expecting scalar or matrix as first argument", fn);
+                  RowVector ralpha = args(0).xrow_vector_value ("%s: ALPHA must be a scalar or matrix", fn);
 
                   ComplexColumnVector cx =
-                    x_arg.xcomplex_column_vector_value ("%s: expecting scalar or matrix as second argument", fn);
+                    x_arg.xcomplex_column_vector_value ("%s: X must be a scalar or matrix", fn);
 
                   Array<octave_idx_type> ierr;
                   octave_value result;
@@ -281,11 +281,11 @@
                 }
               else
                 {
-                  NDArray alpha = args(0).xarray_value ("%s: expecting scalar or matrix as first argument", fn);
+                  NDArray alpha = args(0).xarray_value ("%s: ALPHA must be a scalar or matrix", fn);
 
                   if (x_arg.is_scalar_type ())
                     {
-                      Complex x = x_arg.xcomplex_value ("%s: expecting scalar or matrix as second argument", fn);
+                      Complex x = x_arg.xcomplex_value ("%s: X must be a scalar or matrix", fn);
 
                       Array<octave_idx_type> ierr;
                       octave_value result;
@@ -299,7 +299,7 @@
                     }
                   else
                     {
-                      ComplexNDArray x = x_arg.xcomplex_array_value ("%s: expecting scalar or matrix as second argument", fn);
+                      ComplexNDArray x = x_arg.xcomplex_array_value ("%s: X must be a scalar or matrix", fn);
 
                       Array<octave_idx_type> ierr;
                       octave_value result;
@@ -453,7 +453,7 @@
       else if (kind == 2)
         retval = do_bessel (BESSEL_H2, "besselh", tmp_args, nargout);
       else
-        error ("besselh: expecting K = 1 or 2");
+        error ("besselh: K must be 1 or 2");
     }
   else
     print_usage ();
@@ -523,7 +523,7 @@
           kind = args(0).xint_value ("airy: K must be an integer value");
 
           if (kind < 0 || kind > 3)
-            error ("airy: expecting K = 0, 1, 2, or 3");
+            error ("airy: K must be 0, 1, 2, or 3");
         }
 
       int idx = nargin == 1 ? 0 : 1;
--- a/libinterp/corefcn/bitfcns.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/bitfcns.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -502,7 +502,7 @@
         error ("bitshift: size of A and N must match, or one operand must be a scalar"); \
     } \
   else \
-    error ("bitshift: expecting integer as second argument"); \
+    error ("bitshift: K must be a scalar or array of integers"); \
 
 #define DO_UBITSHIFT(T, N) \
   do \
@@ -574,7 +574,7 @@
     {
       int nbits = 64;
 
-      NDArray n = args(1).xarray_value ("bitshift: expecting integer as second argument");
+      NDArray n = args(1).xarray_value ("bitshift: K must be a scalar or array of integers");
 
       if (nargin == 3)
         {
@@ -657,7 +657,7 @@
 %!assert (bitshift (uint64 (16), 4), uint64 (256))
 %!assert (bitshift (uint8 (255), 1), uint8 (254))
 
-%!error <expecting integer as second argument> bitshift (16, 1.5)
+%!error <K must be a scalar or array of integers> bitshift (16, 1.5)
 %!error bitshift (16, {1})
 %!error <N must be a scalar integer> bitshift (10, [-2 -1 0 1 2], [1 1 1 1 1])
 %!error <N must be positive> bitshift (10, [-2 -1 0 1 2], -1)
--- a/libinterp/corefcn/colloc.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/colloc.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -80,7 +80,7 @@
 
   for (int i = 1; i < nargin; i++)
     {
-      std::string s = args(i).xstring_value ("colloc: expecting string argument \"left\" or \"right\"");
+      std::string s = args(i).xstring_value ("colloc: optional arguments must be strings");
 
       if ((s.length () == 1 && (s[0] == 'R' || s[0] == 'r'))
           || s == "right")
@@ -94,7 +94,7 @@
         }
       else
         {
-          error ("colloc: unrecognized argument");
+          error ("colloc: string argument must be \"left\" or \"right\"");
           return retval;
         }
     }
--- a/libinterp/corefcn/daspk.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/daspk.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -384,23 +384,23 @@
       if (! daspk_fcn)
         DASPK_ABORT ();
 
-      ColumnVector state = args(1).xvector_value ("expecting state vector as second argument");
+      ColumnVector state = args(1).xvector_value ("daspk: initial state X_0 must be a vector");
 
-      ColumnVector deriv = args(2).xvector_value ("expecting derivative vector as third argument");
+      ColumnVector deriv = args(2).xvector_value ("daspk: initial derivatives XDOT_0 must be a vector");
 
-      ColumnVector out_times = args(3).xvector_value ("expecting output time vector as fourth argument");
+      ColumnVector out_times = args(3).xvector_value ("daspk: output time variable T must be a vector");
 
       ColumnVector crit_times;
       int crit_times_set = 0;
       if (nargin > 4)
         {
-          crit_times = args(4).xvector_value ("expecting critical time vector as fifth argument");
+          crit_times = args(4).xvector_value ("daspk: list of critical times T_CRIT must be a vector");
 
           crit_times_set = 1;
         }
 
       if (state.numel () != deriv.numel ())
-        DASPK_ABORT1 ("x and xdot must have the same size");
+        DASPK_ABORT1 ("X_0 and XDOT_0 must have the same size");
 
       double tzero = out_times (0);
 
--- a/libinterp/corefcn/dasrt.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/dasrt.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -471,7 +471,7 @@
       dasrt_cf = args(1).function_value ();
 
       if (! dasrt_cf)
-        DASRT_ABORT1 ("expecting function name as argument 2");
+        DASRT_ABORT1 ("invalid constraint function G");
 
       argp++;
 
@@ -481,19 +481,19 @@
     {
       dasrt_cf = is_valid_function (args(1), "dasrt", true);
       if (! dasrt_cf)
-        DASRT_ABORT1 ("expecting function name as argument 2");
+        DASRT_ABORT1 ("invalid constraint function G");
 
       argp++;
 
       func.set_constraint_function (dasrt_user_cf);
     }
 
-  ColumnVector state = args(argp).xvector_value ("expecting state vector as argument %d", ++argp);
+  ColumnVector state = args(argp).xvector_value ("dasrt: initial state X_0 must be a vector");
 
-  ColumnVector stateprime = args(argp).xvector_value ("expecting time derivative of state vector as argument %d", argp);
+  ColumnVector stateprime = args(argp).xvector_value ("dasrt: initial derivatives XDOT_0 must be a vector");
   argp++;
 
-  ColumnVector out_times = args(argp).xvector_value ("expecting output time vector as %s argument %d", argp);
+  ColumnVector out_times = args(argp).xvector_value ("dasrt: output time variable T must be a vector");
   argp++;
 
   double tzero = out_times (0);
@@ -504,7 +504,7 @@
 
   if (argp < nargin)
     {
-      crit_times = args(argp).xvector_value ("expecting critical time vector as argument %d", argp);
+      crit_times = args(argp).xvector_value ("dasrt: list of critical times T_CRIT must be a vector");
       argp++;
 
       crit_times_set = true;
--- a/libinterp/corefcn/dassl.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/dassl.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -385,23 +385,23 @@
       if (! dassl_fcn)
         DASSL_ABORT ();
 
-      ColumnVector state = args(1).xvector_value ("expecting state vector as second argument");
+      ColumnVector state = args(1).xvector_value ("dassl: initial state X_0 must be a vector");
 
-      ColumnVector deriv = args(2).xvector_value ("expecting derivative vector as third argument");
+      ColumnVector deriv = args(2).xvector_value ("dassl: initial derivatives XDOT_0 must be a vector");
 
-      ColumnVector out_times = args(3).xvector_value ("expecting output time vector as fourth argument");
+      ColumnVector out_times = args(3).xvector_value ("dassl: output time variable T must be a vector");
 
       ColumnVector crit_times;
       int crit_times_set = 0;
       if (nargin > 4)
         {
-          crit_times = args(4).xvector_value ("expecting critical time vector as fifth argument");
+          crit_times = args(4).xvector_value ("dassl: list of critical times T_CRIT must be a vector");
 
           crit_times_set = 1;
         }
 
       if (state.numel () != deriv.numel ())
-        DASSL_ABORT1 ("x and xdot must have the same size");
+        DASSL_ABORT1 ("X and XDOT_0 must have the same size");
 
       double tzero = out_times (0);
 
--- a/libinterp/corefcn/data.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/data.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -96,7 +96,7 @@
  \
   if (nargin == 1 || nargin == 2) \
     { \
-      int dim = (nargin == 1 ? -1 : args(1).int_value (#FCN ": expecting dimension argument to be an integer") - 1); \
+      int dim = (nargin == 1 ? -1 : args(1).int_value (#FCN ": DIM must be an integer") - 1); \
  \
       if (dim >= -1) \
         retval = args(0).FCN (dim); \
@@ -3939,7 +3939,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xidx_type_value ("%s: expecting scalar integer arguments", fcn));
+                     ? 0 : args(i).xidx_type_value ("%s: dimension arguments must be scalar integers", fcn));
       }
       break;
     }
@@ -4049,7 +4049,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xidx_type_value ("%s: expecting scalar integer arguments", fcn));
+                     ? 0 : args(i).xidx_type_value ("%s: dimension arguments must be scalar integers", fcn));
       }
       break;
     }
@@ -4113,7 +4113,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xidx_type_value ("%s: expecting scalar integer arguments", fcn));
+                     ? 0 : args(i).xidx_type_value ("%s: dimension arguments must be scalar integers", fcn));
       }
       break;
     }
@@ -4178,7 +4178,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xidx_type_value ("%s: expecting scalar integer arguments", fcn));
+                     ? 0 : args(i).xidx_type_value ("%s: dimension arguments must be scalar integers", fcn));
       }
       break;
     }
@@ -4233,7 +4233,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xidx_type_value ("%s: expecting scalar integer arguments", fcn));
+                     ? 0 : args(i).xidx_type_value ("%s: dimension arguments must be scalar integers", fcn));
       }
       break;
     }
@@ -6873,7 +6873,7 @@
   // FIXME: shouldn't these modes be scoped inside a class?
   sortmode smode = UNSORTED;
 
-  std::string mode = arg.xstring_value ("issorted: expecting %s argument to be a string", argn);
+  std::string mode = arg.xstring_value ("issorted: MODE must be a string");
 
   if (mode == "ascending")
     smode = ASCENDING;
--- a/libinterp/corefcn/dirfns.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/dirfns.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -337,7 +337,7 @@
                 status = octave_recursive_rmdir (fulldir, msg);
             }
           else
-            error ("rmdir: expecting second argument to be \"s\"");
+            error ("rmdir: second argument must be \"s\" for recursive removal");
         }
       else
         status = octave_rmdir (fulldir, msg);
--- a/libinterp/corefcn/ellipj.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/ellipj.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -83,14 +83,14 @@
 
   if (m_arg.is_scalar_type ())
     {
-      double m = args(1).xdouble_value ("ellipj: expecting scalar or matrix as second argument");
+      double m = args(1).xdouble_value ("ellipj: M must be a scalar or matrix");
 
       if (u_arg.is_scalar_type ())
         {
           if (u_arg.is_real_type ())
             {
               // u real, m scalar
-              double u = args(0).xdouble_value ("ellipj: expecting scalar or matrix as first argument");
+              double u = args(0).xdouble_value ("ellipj: U must be a scalar or matrix");
 
               double sn, cn, dn;
               double err = 0;
@@ -106,7 +106,7 @@
           else
             {
               // u complex, m scalar
-              Complex u = u_arg.xcomplex_value ("ellipj: expecting scalar or matrix as first argument");
+              Complex u = u_arg.xcomplex_value ("ellipj: U must be a scalar or matrix");
 
               Complex sn, cn, dn;
               double err = 0;
@@ -123,7 +123,7 @@
       else
         {
           // u is matrix, m is scalar
-          ComplexNDArray u = u_arg.xcomplex_array_value ("ellipj: expecting scalar or matrix as first argument");
+          ComplexNDArray u = u_arg.xcomplex_array_value ("ellipj: U must be a scalar or matrix");
 
           dim_vector sz_u = u.dims ();
 
@@ -149,7 +149,7 @@
     }
   else
     {
-      NDArray m = args(1).xarray_value ("ellipj: expecting scalar or matrix as second argument");
+      NDArray m = args(1).xarray_value ("ellipj: M must be a scalar or matrix");
 
       dim_vector sz_m = m.dims ();
 
@@ -159,7 +159,7 @@
           if (u_arg.is_real_type ())
             {
               // u is real scalar, m is array
-              double u = u_arg.xdouble_value ("ellipj: expecting scalar or matrix as first argument");
+              double u = u_arg.xdouble_value ("ellipj: U must be a scalar or matrix");
 
               NDArray sn (sz_m), cn (sz_m), dn (sz_m);
               NDArray err (sz_m);
@@ -183,7 +183,7 @@
           else
             {
               // u is complex scalar, m is array
-              Complex u = u_arg.xcomplex_value ("ellipj: expecting scalar or matrix as first argument");
+              Complex u = u_arg.xcomplex_value ("ellipj: U must be a scalar or matrix");
 
               ComplexNDArray sn (sz_m), cn (sz_m), dn (sz_m);
               NDArray err (sz_m);
@@ -211,7 +211,7 @@
           if (u_arg.is_real_type ())
             {
               // u is real array, m is array
-              NDArray u = u_arg.xarray_value ("ellipj: expecting scalar or matrix as first argument");
+              NDArray u = u_arg.xarray_value ("ellipj: U must be a scalar or matrix");
 
               dim_vector sz_u = u.dims ();
 
@@ -268,7 +268,7 @@
           else
             {
               // u is complex array, m is array
-              ComplexNDArray u = u_arg.xcomplex_array_value ("ellipj: expecting scalar or matrix as second argument");
+              ComplexNDArray u = u_arg.xcomplex_array_value ("ellipj: U must be a scalar or matrix");
 
               dim_vector sz_u = u.dims ();
 
@@ -871,18 +871,18 @@
 %!error ellipj ()
 %!error ellipj (1)
 %!error ellipj (1,2,3,4)
-%!warning <expecting 0 <= M <= 1> ellipj (1,2);
+%!warning <required value 0 <= M <= 1> ellipj (1,2);
 ## FIXME: errors commented out untill lasterr() truly returns the last error.
-%!#error <expecting scalar or matrix as second argument> ellipj (1, "1")
-%!#error <expecting scalar or matrix as first argument> ellipj ("1", 1)
-%!#error <expecting scalar or matrix as first argument> ellipj ({1}, 1)
-%!#error <expecting scalar or matrix as first argument> ellipj ({1, 2}, 1)
-%!#error <expecting scalar or matrix as second argument> ellipj (1, {1, 2})
-%!#error <expecting scalar or matrix as first argument> ellipj ("1", [1, 2])
-%!#error <expecting scalar or matrix as first argument> ellipj ({1}, [1, 2])
-%!#error <expecting scalar or matrix as first argument> ellipj ({1}, [1, 2])
-%!#error <expecting scalar or matrix as first argument> ellipj ("1,2", [1, 2])
-%!#error <expecting scalar or matrix as first argument> ellipj ({1, 2}, [1, 2])
+%!#error <M must be a scalar or matrix> ellipj (1, "1")
+%!#error <U must be a scalar or matrix> ellipj ("1", 1)
+%!#error <U must be a scalar or matrix> ellipj ({1}, 1)
+%!#error <U must be a scalar or matrix> ellipj ({1, 2}, 1)
+%!#error <M must be a scalar or matrix> ellipj (1, {1, 2})
+%!#error <U must be a scalar or matrix> ellipj ("1", [1, 2])
+%!#error <U must be a scalar or matrix> ellipj ({1}, [1, 2])
+%!#error <U must be a scalar or matrix> ellipj ({1}, [1, 2])
+%!#error <U must be a scalar or matrix> ellipj ("1,2", [1, 2])
+%!#error <U must be a scalar or matrix> ellipj ({1, 2}, [1, 2])
 %!error <Invalid size combination for U and M> ellipj ([1:4], [1:3])
 %!error <Invalid size combination for U and M> ellipj (complex (1:4,1:4), [1:3])
 
--- a/libinterp/corefcn/error.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/error.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1668,7 +1668,7 @@
                 }
             }
           else
-            error ("warning: expecting structure with fields 'identifier' and 'state'");
+            error ("warning: STATE structure must have fields 'identifier' and 'state'");
 
           done = true;
 
--- a/libinterp/corefcn/gl-render.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/gl-render.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -223,7 +223,7 @@
       else
         {
           ok = false;
-          warning ("opengl_texture::create: invalid texture data type (expected double or uint8)");
+          warning ("opengl_texture::create: invalid texture data type (double or uint8 required)");
         }
 
       if (ok)
--- a/libinterp/corefcn/graphics.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/graphics.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1668,7 +1668,7 @@
         error ("addproperty: missing possible values for radio property");
       else
         {
-          std::string sv = args(0).xstring_value ("addproperty: invalid argument for radio property, expected a string value");
+          std::string sv = args(0).xstring_value ("addproperty: argument for radio property must be a string");
 
           retval = property (new radio_property (name, h, sv));
 
@@ -2146,7 +2146,7 @@
     {
       for (int i = 0; i < nargin; i += 2)
         {
-          caseless_str pname = args(i).xstring_value ("set: expecting argument %d to be a property name", i);
+          caseless_str pname = args(i).xstring_value ("set: argument %d must be a property name", i);
 
           octave_value val = args(i+1);
 
@@ -2552,7 +2552,7 @@
 {
   graphics_handle h = octave_NaN;
 
-  double hv = ov.xdouble_value ("%s: expecting %s to be a graphics handle",
+  double hv = ov.xdouble_value ("%s: %s must be a graphics handle",
                                who.c_str (), pname.c_str ());
 
   h = gh_manager::lookup (hv);
@@ -2965,7 +2965,7 @@
 void
 base_properties::set_parent (const octave_value& val)
 {
-  double hp = val.xdouble_value ("set: expecting parent to be a graphics handle");
+  double hp = val.xdouble_value ("set: parent must be a graphics handle");
 
   graphics_handle new_parent = octave_NaN;
 
@@ -9624,7 +9624,7 @@
   else
     {
       // get vector of graphics handles
-      ColumnVector hcv = args(0).xvector_value ("reset: expecting graphics handle as first argument");
+      ColumnVector hcv = args(0).xvector_value ("reset: H must be a graphics handle");
 
       // loop over graphics objects
       for (octave_idx_type n = 0; n < hcv.numel (); n++)
@@ -9833,7 +9833,7 @@
   if (nargin > 0)
     {
       // get vector of graphics handles
-      ColumnVector hcv = args(0).xvector_value ("set: expecting graphics handle as first argument");
+      ColumnVector hcv = args(0).xvector_value ("set: H must be a graphics handle");
 
       bool request_drawnow = false;
 
@@ -9980,7 +9980,7 @@
           return retval;
         }
 
-      ColumnVector hcv = args(0).xvector_value ("get: expecting graphics handle as first argument");
+      ColumnVector hcv = args(0).xvector_value ("get: H must be a graphics handle");
 
       octave_idx_type len = hcv.numel ();
 
@@ -9994,7 +9994,7 @@
 
               if (typ != typ0)
                 {
-                  error ("get: vector of handles must all have same type");
+                  error ("get: vector of handles must all have the same type");
                   break;
                 }
             }
@@ -10002,7 +10002,7 @@
 
       if (nargin > 1 && args(1).is_cellstr ())
         {
-          Array<std::string> plist = args(1).xcellstr_value ("get: expecting property name or cell array of property names as second argument");
+          Array<std::string> plist = args(1).cellstr_value ();
 
           octave_idx_type plen = plist.numel ();
 
@@ -10035,7 +10035,7 @@
           caseless_str property;
 
           if (nargin > 1)
-            property = args(1).xstring_value ("get: expecting property name or cell array of property names as second argument");
+            property = args(1).xstring_value ("get: second argument must be property name or cell array of property names");
 
           vals.resize (dim_vector (len, 1));
 
@@ -10111,7 +10111,7 @@
 
   if (nargin == 1)
     {
-      ColumnVector hcv = args(0).xvector_value ("get: expecting graphics handle as first argument");
+      ColumnVector hcv = args(0).xvector_value ("get: H must be a graphics handle");
 
       octave_idx_type len = hcv.numel ();
 
@@ -10219,7 +10219,7 @@
 
   if (args.length () > 0)
     {
-      double val = args(0).xdouble_value ("__go_figure__: expecting figure number to be double value");
+      double val = args(0).xdouble_value ("__go_figure__: figure number must be a double value");
 
       if (is_figure (val))
         {
@@ -10360,7 +10360,7 @@
 
   if (nargin == 1)
     {
-      double h = args(0).xdouble_value ("__calc_dimensions__: expecting graphics handle as only argument");
+      double h = args(0).xdouble_value ("__calc_dimensions__: first argument must be a graphics handle");
 
       retval = calc_dimensions (gh_manager::get_object (h));
     }
@@ -10881,13 +10881,13 @@
 
           if (args.length () == 1)
             {
-              caseless_str val (args(0).xstring_value ("drawnow: expecting argument to be a string"));
+              caseless_str val (args(0).xstring_value ("drawnow: first argument must be a string"));
 
               if (val.compare ("expose"))
                 do_events = false;
               else
                 {
-                  error ("drawnow: invalid argument, expected 'expose' as argument");
+                  error ("drawnow: invalid argument, 'expose' is only valid option");
 
                   gh_manager::unlock ();
 
@@ -10909,9 +10909,9 @@
           std::string term, file, debug_file;
           bool mono;
 
-          term = args(0).xstring_value ("drawnow: invalid terminal TERM, expected a string value");
-
-          file = args(1).xstring_value ("drawnow: invalid FILE, expected a string value");
+          term = args(0).xstring_value ("drawnow: TERM must be a string");
+
+          file = args(1).xstring_value ("drawnow: FILE must be a string");
 
           size_t pos_p = file.find_first_of ("|");
           size_t pos_c = file.find_first_not_of ("| ");
@@ -10960,9 +10960,9 @@
                 }
             }
 
-          mono = (args.length () >= 3 ? args(2).xbool_value ("drawnow: invalid colormode MONO, expected a boolean value") : false);
-
-          debug_file = (args.length () > 3 ? args(3).xstring_value ("drawnow: invalid DEBUG_FILE, expected a string value") : "");
+          mono = (args.length () >= 3 ? args(2).xbool_value ("drawnow: MONO colormode must be a boolean value") : false);
+
+          debug_file = (args.length () > 3 ? args(3).xstring_value ("drawnow: DEBUG_FILE must be a string") : "");
 
           graphics_handle h = gcf ();
 
@@ -11030,9 +11030,9 @@
 
   if (args.length () >= 3 && args.length () <= 4)
     {
-      double h = args(0).xdouble_value ("addlistener: invalid handle");
-
-      std::string pname = args(1).xstring_value ("addlistener: invalid property name, expected a string value");
+      double h = args(0).xdouble_value ("addlistener: invalid handle H");
+
+      std::string pname = args(1).xstring_value ("addlistener: PROP must be a string");
 
       graphics_handle gh = gh_manager::lookup (h);
 
@@ -11094,7 +11094,7 @@
     {
       double h = args(0).xdouble_value ("dellistener: invalid handle");
 
-      std::string pname = args(1).xstring_value ("dellistener: invalid property name, expected a string value");
+      std::string pname = args(1).xstring_value ("dellistener: PROP must be a string");
 
       graphics_handle gh = gh_manager::lookup (h);
 
@@ -11205,9 +11205,9 @@
 
   if (args.length () >= 3)
     {
-      std::string name = args(0).xstring_value ("addproperty: invalid property NAME, expected a string value");
-
-      double h = args(1).xdouble_value ("addproperty: invalid handle value");
+      std::string name = args(0).xstring_value ("addproperty: NAME must be a string");
+
+      double h = args(1).xdouble_value ("addproperty: invalid handle H");
 
       graphics_handle gh = gh_manager::lookup (h);
 
@@ -11215,7 +11215,7 @@
         {
           graphics_object go = gh_manager::get_object (gh);
 
-          std::string type = args(2).xstring_value ("addproperty: invalid property TYPE, expected a string value");
+          std::string type = args(2).xstring_value ("addproperty: TYPE must be a string");
 
           if (! go.get_properties ().has_property (name))
             {
@@ -11543,7 +11543,7 @@
                 }
             }
           else if (error_state || pname.empty ())
-            error ("waitfor: invalid property name, expected a non-empty string value");
+            error ("waitfor: PROP must be a non-empty string");
         }
 
       if (timeout_index < 0 && args.length () > (max_arg_index + 1))
@@ -11566,16 +11566,16 @@
           if (args.length () > (timeout_index + 1))
             {
               timeout = static_cast<int>
-                (args(timeout_index + 1).xscalar_value ("waitfor: invalid timeout value, expected a value >= 1"));
+                (args(timeout_index + 1).xscalar_value ("waitfor: TIMEOUT must be a scalar >= 1"));
 
               if (timeout < 1)
                 {
-                  warning ("waitfor: the timeout value must be >= 1, using 1 instead");
+                  warning ("waitfor: TIMEOUT value must be >= 1, using 1 instead");
                   timeout = 1;
                 }
             }
           else
-            error ("waitfor: missing timeout value");
+            error ("waitfor: missing TIMEOUT value");
         }
 
       // FIXME: There is still a "hole" in the following loop. The code
--- a/libinterp/corefcn/graphics.in.h	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/graphics.in.h	Wed Nov 18 10:40:26 2015 -0800
@@ -1705,7 +1705,7 @@
       }
     catch (const octave_execution_exception&)
       {
-        error ("set: expecting children to be array of graphics handles");
+        error ("set: children must be an array of graphics handles");
       }
 
     octave_idx_type nel = new_kids.numel ();
--- a/libinterp/corefcn/load-path.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/load-path.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -2427,7 +2427,7 @@
         }
       else if (option_arg.is_numeric_type ())
         {
-          int val = option_arg.xint_value ("addpath: expecting final argument to be 1 or 0");
+          int val = option_arg.xint_value ("addpath: OPTION must be '-begin'/0 or '-end'/1");
 
           if (val == 0)
             nargin--;
@@ -2438,7 +2438,7 @@
             }
           else
             {
-              error ("addpath: expecting final argument to be 1 or 0");
+              error ("addpath: OPTION must be '-begin'/0 or '-end'/1");
               return retval;
             }
         }
--- a/libinterp/corefcn/lsode.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/lsode.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -384,15 +384,15 @@
       if (! lsode_fcn)
         error ("lsode: FCN argument is not a valid function name or handle");
 
-      ColumnVector state = args(1).xvector_value ("lsode: expecting state vector as second argument");
-      ColumnVector out_times = args(2).xvector_value ("lsode: expecting output time vector as third argument");
+      ColumnVector state = args(1).xvector_value ("lsode: initial state X_0 must be a vector");
+      ColumnVector out_times = args(2).xvector_value ("lsode: output time variable T must be a vector");
 
       ColumnVector crit_times;
 
       int crit_times_set = 0;
       if (nargin > 3)
         {
-          crit_times = args(3).xvector_value ("lsode: expecting critical time vector as fourth argument");
+          crit_times = args(3).xvector_value ("lsode: list of critical times T_CRIT must be a vector");
 
           crit_times_set = 1;
         }
--- a/libinterp/corefcn/lu.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/lu.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -184,7 +184,7 @@
           else if (tmp.numel () == 2)
             thres = tmp;
           else
-            error ("lu: expecting 2-element vector for THRES");
+            error ("lu: THRES must be a 1 or 2-element vector");
         }
     }
 
--- a/libinterp/corefcn/luinc.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/luinc.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -159,7 +159,7 @@
                 }
               else if (thresh.numel () != 2)
                 {
-                  error ("luinc: expecting 2-element vector for thresh");
+                  error ("luinc: THRESH must be a 1 or 2-element vector");
                   return retval;
                 }
             }
--- a/libinterp/corefcn/oct-hist.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/oct-hist.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -172,8 +172,8 @@
           if (i < nargin - 1)
             {
               std::string fname
-                = args(++i).xstring_value ("history: expecting file name for %s option",
-                                          option.c_str ());
+                = args(++i).xstring_value ("history: filename must be a string for %s option",
+                                           option.c_str ());
 
               command_history::set_file (fname);
             }
--- a/libinterp/corefcn/oct-obj.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/oct-obj.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -263,7 +263,7 @@
         }
     }
   else
-    error ("%s: expecting all arguments to be strings", fcn_name.c_str ());
+    error ("%s: all arguments must be strings", fcn_name.c_str ());
 
   return argv;
 }
--- a/libinterp/corefcn/octave-link.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/octave-link.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -122,7 +122,7 @@
 
   if (args.length () == 1)
     {
-      std::string file = args(0).xstring_value ("expecting file name as argument");
+      std::string file = args(0).xstring_value ("first argument must be filename");
 
       flush_octave_stdout ();
 
@@ -130,7 +130,7 @@
     }
   else if (args.length () == 2)
     {
-      std::string file = args(0).xstring_value ("expecting file name as first argument");
+      std::string file = args(0).xstring_value ("first argument must be filename");
 
       flush_octave_stdout ();
 
--- a/libinterp/corefcn/quad.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/quad.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -229,8 +229,8 @@
 
       if (args(1).is_single_type () || args(2).is_single_type ())
         {
-          float a = args(1).xfloat_value ("quad: expecting second argument to be a scalar");
-          float b = args(2).xfloat_value ("quad: expecting third argument to be a scalar");
+          float a = args(1).xfloat_value ("quad: lower limit of integration A must be a scalar");
+          float b = args(2).xfloat_value ("quad: upper limit of integration B must be a scalar");
 
           int indefinite = 0;
           FloatIndefQuad::IntegralType indef_type
@@ -270,10 +270,10 @@
 
               have_sing = true;
 
-              sing = args(4).xfloat_vector_value ("quad: expecting vector of singularities as fourth argument");
+              sing = args(4).xfloat_vector_value ("quad: fifth argument SING must be a vector vector of singularities");
 
             case 4:
-              tol = args(3).xfloat_vector_value ("quad: expecting vector of tolerances as fifth argument");
+              tol = args(3).xfloat_vector_value ("quad: TOL must be a 1 or 2-element vector");
 
               switch (tol.numel ())
                 {
@@ -285,7 +285,7 @@
                   break;
 
                 default:
-                  error ("quad: expecting tol to contain no more than two values");
+                  error ("quad: TOL must be a 1 or 2-element vector");
                 }
 
             case 3:
@@ -326,8 +326,8 @@
         }
       else
         {
-          double a = args(1).xdouble_value ("quad: expecting second argument to be a scalar");
-          double b = args(2).xdouble_value ("quad: expecting third argument to be a scalar");
+          double a = args(1).xdouble_value ("quad: lower limit of integration A must be a scalar");
+          double b = args(2).xdouble_value ("quad: upper limit of integration B must be a scalar");
 
           int indefinite = 0;
           IndefQuad::IntegralType indef_type = IndefQuad::doubly_infinite;
@@ -366,10 +366,10 @@
 
               have_sing = true;
 
-              sing = args(4).vector_value ("quad: expecting vector of singularities as fourth argument");
+              sing = args(4).vector_value ("quad: fifth argument SING must be a vector vector of singularities");
 
             case 4:
-              tol = args(3).xvector_value ("quad: expecting vector of tolerances as fifth argument");
+              tol = args(3).xvector_value ("quad: TOL must be a 1 or 2-element vector");
 
               switch (tol.numel ())
                 {
@@ -381,7 +381,7 @@
                   break;
 
                 default:
-                  error ("quad: expecting tol to contain no more than two values");
+                  error ("quad: TOL must be a 1 or 2-element vector");
                 }
 
             case 3:
--- a/libinterp/corefcn/rand.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/rand.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -87,14 +87,14 @@
     {
       if (nargin == 0)
         {
-          error ("%s: expecting at least one argument", fcn);
+          error ("%s: at least one argument is required", fcn);
           goto done;
         }
       else if (args(0).is_string ())
         additional_arg = false;
       else
         {
-          a = args(0).xarray_value ("%s: expecting scalar or matrix arguments", fcn);
+          a = args(0).xarray_value ("%s: dimension must be a scalar integer", fcn);
 
           idx++;
           nargin--;
@@ -194,8 +194,8 @@
 
                 for (octave_idx_type i = 0; i < n; i++)
                   {
-                    //Negative dimensions are treated as zero for Matlab
-                    //compatibility
+                    // Negative dimensions are treated as zero for Matlab
+                    // compatibility
                     dims(i) = base >= 0 ? base : 0;
                     base += incr;
                   }
@@ -204,8 +204,7 @@
 
               }
             else
-              error ("%s: all elements of range must be integers",
-                     fcn);
+              error ("%s: all elements of range must be integers", fcn);
           }
         else if (tmp.is_matrix_type ())
           {
@@ -219,8 +218,8 @@
 
                 for (octave_idx_type i = 0; i < len; i++)
                   {
-                    //Negative dimensions are treated as zero for Matlab
-                    //compatibility
+                    // Negative dimensions are treated as zero for Matlab
+                    // compatibility
                     octave_idx_type elt = iv(i);
                     dims(i) = elt >=0 ? elt : 0;
                   }
@@ -228,7 +227,7 @@
                 goto gen_matrix;
               }
             else
-              error ("%s: expecting integer vector", fcn);
+              error ("%s: dimensions must be a scalar or array of integers", fcn);
           }
         else
           {
@@ -282,9 +281,9 @@
 
             for (int i = 0; i < nargin; i++)
               {
-                octave_idx_type elt = args(idx+i).xint_value ("%s: expecting integer arguments", fcn);
+                octave_idx_type elt = args(idx+i).xint_value ("%s: dimension must be a scalar or array of integers", fcn);
 
-                //Negative is zero for Matlab compatibility
+                // Negative is zero for Matlab compatibility
                 dims(i) = elt >= 0 ? elt : 0;
               }
 
@@ -1193,8 +1192,8 @@
               octave_idx_type k = i +
                 gnulib::floor (rvec[i] * (n - i));
 
-              //For shuffling first m entries, no need to use extra
-              //storage
+              // For shuffling first m entries, no need to use extra
+              // storage
               if (k < m)
                 {
                   std::swap (ivec[i], ivec[k]);
--- a/libinterp/corefcn/symtab.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/symtab.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1688,7 +1688,7 @@
 
   if (nargin == 1)
     {
-      std::string sval = args(0).xstring_value ("ignore_function_time_stamp: expecting argument to be a string");
+      std::string sval = args(0).xstring_value ("ignore_function_time_stamp: first argument must be a string");
 
       if (sval == "all")
         Vignore_function_time_stamp = 2;
@@ -1697,7 +1697,7 @@
       else if (sval == "none")
         Vignore_function_time_stamp = 0;
       else
-        error ("ignore_function_time_stamp: argument must be \"all\", \"system\", or \"none\"");
+        error ("ignore_function_time_stamp: argument must be one of \"all\", \"system\", or \"none\"");
     }
   else if (nargin > 1)
     print_usage ();
@@ -1791,11 +1791,11 @@
               symbol_table::dump_functions (octave_stdout);
             }
           else
-            error ("__dump_symtab_info__: expecting \"functions\" or \"scopes\"");
+            error ("__dump_symtab_info__: string argument must be \"functions\" or \"scopes\"");
         }
       else
         {
-          int s = arg.xint_value ("__dump_symtab_info__: expecting string or scope id");
+          int s = arg.xint_value ("__dump_symtab_info__: first argument must be string or scope id");
 
           symbol_table::dump (octave_stdout, s);
         }
@@ -1816,7 +1816,7 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).xstring_value ("__get_cmd_line_function_text__: expecting function name");
+      std::string name = args(0).xstring_value ("__get_cmd_line_function_text__: first argument must be function name");
 
       octave_value ov = symbol_table::find_cmdline_function (name);
 
@@ -1849,7 +1849,7 @@
 
   if (args.length () == 2)
     {
-      std::string name = args(0).xstring_value ("set_variable: expecting variable name as first argument");
+      std::string name = args(0).xstring_value ("set_variable: variable NAME must be a string");
 
       symbol_table::assign (name, args(1));
     }
@@ -1865,7 +1865,7 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).xstring_value ("variable_value: expecting variable name as first argument");
+      std::string name = args(0).xstring_value ("variable_value: variable NAME must be a string");
 
       retval = symbol_table::varval (name);
 
--- a/libinterp/corefcn/sysdep.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/sysdep.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -938,7 +938,8 @@
 
 DEFUN (tilde_expand, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} tilde_expand (@var{string})\n\
+@deftypefn  {Built-in Function} {} tilde_expand (@var{string})\n\
+@deftypefnx {Built-in Function} {} tilde_expand (@var{cellstr})\n\
 Perform tilde expansion on @var{string}.\n\
 \n\
 If @var{string} begins with a tilde character, (@samp{~}), all of the\n\
@@ -948,7 +949,10 @@
 user.  If the tilde is followed immediately by a slash, the tilde is\n\
 replaced by the home directory of the user running Octave.\n\
 \n\
-For example:\n\
+If the input is a cell array of strings @var{cellstr} then tilde expansion\n\
+is performed on each string element.\n\
+\n\
+Examples:\n\
 \n\
 @example\n\
 @group\n\
@@ -968,7 +972,7 @@
     {
       octave_value arg = args(0);
 
-      string_vector sv = arg.all_strings ("tilde_expand: expecting argument to be char or cellstr object");
+      string_vector sv = arg.all_strings ("tilde_expand: argument must be char or cellstr object");
 
       sv = file_ops::tilde_expand (sv);
 
--- a/libinterp/corefcn/toplev.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/toplev.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1068,7 +1068,7 @@
           return retval;
         }
 
-      std::string cmd_str = args(0).xstring_value ("system: expecting string as first argument");
+      std::string cmd_str = args(0).xstring_value ("system: first argument must be a string");
 
 #if defined (__WIN32__) && ! defined (__CYGWIN__)
       // Work around weird double-quote handling on Windows systems.
--- a/libinterp/corefcn/utils.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/utils.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -323,13 +323,13 @@
               octave_env::make_absolute (load_path::find_first_of (names));
           else if (nargin == 2)
             {
-              std::string opt = args(1).xstring_value ("file_in_loadpath: expecting option to be a string");
+              std::string opt = args(1).xstring_value ("file_in_loadpath: optional second argument must be a string");
 
               if (opt == "all")
                 retval = Cell (make_absolute
                                (load_path::find_all_first_of (names)));
               else
-                error ("file_in_loadpath: invalid option `%s'", opt.c_str ());
+                error ("file_in_loadpath: \"all\" is only valid second argument");
             }
         }
       else
@@ -403,13 +403,13 @@
             retval = search_path_for_file (path, names);
           else if (nargin == 3)
             {
-              std::string opt = args(2).xstring_value ("file_in_path: expecting option to be a string");
+              std::string opt = args(2).xstring_value ("file_in_path: optional third argument must be a string");
 
               if (opt == "all")
                 retval = Cell (make_absolute
                                (search_path_for_all_files (path, names)));
               else
-                error ("file_in_path: invalid option `%s'", opt.c_str ());
+                error ("file_in_path: \"all\" is only valid third argument");
             }
         }
       else
@@ -1242,8 +1242,10 @@
 get_dimensions (const octave_value& a, const octave_value& b,
                 const char *warn_for, octave_idx_type& nr, octave_idx_type& nc)
 {
-  nr = a.is_empty () ? 0 : a.int_value ("%s: expecting two scalar arguments", warn_for);
-  nc = b.is_empty () ? 0 : b.int_value ("%s: expecting two scalar arguments", warn_for);
+  nr = a.is_empty ()
+       ? 0 : a.int_value ("%s: row dimension must be a scalar", warn_for);
+  nc = b.is_empty ()
+       ? 0 : b.int_value ("%s: column dimension must be a scalar", warn_for);
 
   check_dimensions (nr, nc, warn_for);
 }
--- a/libinterp/corefcn/variables.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/variables.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -131,7 +131,7 @@
       ans = is_valid_function (fcn_name, warn_for, warn);
     }
   else if (warn)
-    error ("%s: expecting function name as argument", warn_for.c_str ());
+    error ("%s: argument must be a string containing function name", warn_for.c_str ());
 
   return ans;
 }
@@ -147,8 +147,8 @@
 
   if (! retval)
     {
-      std::string s = arg.xstring_value ("%s: expecting first argument to be a string",
-                                        warn_for.c_str ());
+      std::string s = arg.xstring_value ("%s: first argument must be a string",
+                                         warn_for.c_str ());
 
       std::string cmd = header;
       cmd.append (s);
@@ -738,7 +738,7 @@
         }
       else
         {
-          error_with_cfn ("expecting second argument to be \"local\"");
+          error_with_cfn ("second argument must be \"local\"");
           nargin = 0;
         }
     }
@@ -779,7 +779,7 @@
 
   if (nargin == 1)
     {
-      bool bval = args(0).xbool_value ("%s: expecting arg to be a logical value", nm);
+      bool bval = args(0).xbool_value ("%s: argument must be a logical value", nm);
 
       var = bval;
     }
@@ -851,12 +851,12 @@
 
   if (nargin == 1)
     {
-      int ival = args(0).xint_value ("%s: expecting arg to be an integer value", nm);
+      int ival = args(0).xint_value ("%s: argument must be an integer value", nm);
 
       if (ival < minval)
-        error ("%s: expecting arg to be greater than %d", nm, minval);
+        error ("%s: arg must be greater than %d", nm, minval);
       else if (ival > maxval)
-        error ("%s: expecting arg to be less than or equal to %d",
+        error ("%s: arg must be less than or equal to %d",
                nm, maxval);
       else
         var = ival;
@@ -887,12 +887,12 @@
 
   if (nargin == 1)
     {
-      double dval = args(0).xscalar_value ("%s: expecting arg to be a scalar value", nm);
+      double dval = args(0).xscalar_value ("%s: argument must be a scalar value", nm);
 
       if (dval < minval)
-        error ("%s: expecting arg to be greater than %g", minval);
+        error ("%s: argument must be greater than %g", minval);
       else if (dval > maxval)
-        error ("%s: expecting arg to be less than or equal to %g", maxval);
+        error ("%s: argument must be less than or equal to %g", maxval);
       else
         var = dval;
     }
@@ -2661,7 +2661,7 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).xstring_value ("__varval__: expecting argument to be variable name");
+      std::string name = args(0).xstring_value ("__varval__: first argument must be a variable name");
 
       retval = symbol_table::varval (args(0).string_value ());
     }
--- a/libinterp/dldfcn/__init_fltk__.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/dldfcn/__init_fltk__.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -2189,7 +2189,7 @@
         else if (go.isa ("figure") || go.isa ("uicontextmenu"))
           ;
         else
-          error ("unexpected parent object\n");
+          error ("invalid parent object\n");
 
         uimenup.set_fltk_label (fltk_label);
       }
--- a/libinterp/dldfcn/chol.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/dldfcn/chol.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -162,16 +162,16 @@
   int n = 1;
   while (n < nargin)
     {
-      std::string tmp = args(n++).xstring_value ("chol: expecting trailing string arguments");
+      std::string tmp = args(n++).xstring_value ("chol: optional arguments must be strings");
 
-      if (tmp.compare ("vector") == 0)
+      if (tmp == "vector")
         vecout = true;
-      else if (tmp.compare ("lower") == 0)
+      else if (tmp == "lower")
         LLt = true;
-      else if (tmp.compare ("upper") == 0)
+      else if (tmp == "upper")
         LLt = false;
       else
-        error ("chol: unexpected second or third input");
+        error ("chol: optional argument must be one of \"vector\", \"lower\", or \"upper\"");
     }
 
   octave_value arg = args(0);
@@ -339,8 +339,8 @@
 %!error chol ()
 %!error <matrix must be positive definite> chol ([1, 2; 3, 4])
 %!error <requires square matrix> chol ([1, 2; 3, 4; 5, 6])
-%!error <expecting trailing string arguments> chol (1, 2)
-%!error <unexpected second or third input> chol (1, "foobar")
+%!error <optional arguments must be strings> chol (1, 2)
+%!error <optional argument must be one of "vector", "lower"> chol (1, "foobar")
 */
 
 DEFUN_DLD (cholinv, args, ,
--- a/libinterp/dldfcn/fftw.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/dldfcn/fftw.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -150,13 +150,11 @@
       if (nargin == 2)  //planner setter
         {
           // Use STL function to convert to lower case
-          std::transform (arg0.begin (), arg0.end (), arg0.begin (),
-                          tolower);
+          std::transform (arg0.begin (), arg0.end (), arg0.begin (), tolower);
 
-          std::string arg1 = args(1).xstring_value ("fftw: planner expects a string value as METHOD");
+          std::string arg1 = args(1).xstring_value ("fftw: METHOD must be a string");
 
-          std::transform (arg1.begin (), arg1.end (),
-                          arg1.begin (), tolower);
+          std::transform (arg1.begin (), arg1.end (), arg1.begin (), tolower);
           octave_fftw_planner::FftwMethod meth
             = octave_fftw_planner::UNKNOWN;
           octave_float_fftw_planner::FftwMethod methf
--- a/libinterp/octave-value/ov-cell.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-cell.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1300,7 +1300,7 @@
 
         for (int i = 0; i < nargin; i++)
           dims(i) = (args(i).is_empty ()
-                     ? 0 : args(i).xnint_value ("cell: expecting scalar arguments"));
+                     ? 0 : args(i).xnint_value ("cell: dimension must be a scalar integer"));
       }
       break;
     }
--- a/libinterp/octave-value/ov-ch-mat.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-ch-mat.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -238,8 +238,8 @@
     STRING_MAPPER (xtolower, std::tolower, char);
     STRING_MAPPER (xtoupper, std::toupper, char);
 
-      // For Matlab compatibility, these should work on ASCII values
-      // without error or warning.
+    // For Matlab compatibility, these should work on ASCII values
+    // without error or warning.
     case umap_abs:
     case umap_ceil:
     case umap_fix:
@@ -255,7 +255,7 @@
       }
 
     default:
-      error ("%s: expecting numeric argument", get_umap_name (umap));
+      error ("%s: argument must be numeric", get_umap_name (umap));
       break;
     }
 
--- a/libinterp/octave-value/ov-class.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-class.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -586,11 +586,11 @@
           else
             tmp = feval (meth.function_value (), args);
 
-          // FIXME: should the subsasgn method be able to return
-          // more than one value?
+          // FIXME: Should the subsasgn method be able to return
+          //        more than one value?
 
           if (tmp.length () > 1)
-            error ("expecting single return value from @%s/subsasgn",
+            error ("@%s/subsasgn returned more than one value",
                    class_name ().c_str ());
 
           else
@@ -1856,7 +1856,7 @@
                            id.c_str ());
                 }
               else
-                error ("class: expecting structure S as first argument");
+                error ("class: S must be a valid structure");
             }
           else
             error ("class: '%s' is invalid as a class name in this context",
@@ -2033,9 +2033,10 @@
 
 DEFUN (ismethod, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} ismethod (@var{obj}, @var{method})\n\
-Return true if @var{obj} is a class object and the string @var{method}\n\
-is a method of this class.\n\
+@deftypefn  {Built-in Function} {} ismethod (@var{obj}, @var{method})\n\
+@deftypefnx {Built-in Function} {} ismethod (@var{clsname}, @var{method})\n\
+Return true if the string @var{method} is a valid method of the object\n\
+@var{obj} or of the class @var{clsname}.\n\
 @seealso{isprop, isobject}\n\
 @end deftypefn")
 {
@@ -2052,7 +2053,7 @@
       else if (arg.is_string ())
         class_name = arg.string_value ();
       else
-        error ("ismethod: expecting object or class name as first argument");
+        error ("ismethod: first argument must be object or class name");
 
       std::string method = args(1).string_value ();
 
@@ -2144,7 +2145,7 @@
 
   for (int i = 0; i < args.length (); i++)
     {
-      std::string inf_class = args(i).xstring_value ("superiorto: expecting argument to be class name");
+      std::string inf_class = args(i).xstring_value ("superiorto: CLASS_NAME must be a string");
 
       // User defined classes always have higher precedence
       // than built-in classes
@@ -2185,7 +2186,7 @@
 
   for (int i = 0; i < args.length (); i++)
     {
-      std::string sup_class = args(i).xstring_value ("inferiorto: expecting argument to be class name");
+      std::string sup_class = args(i).xstring_value ("inferiorto: CLASS_NAME must be a string");
 
       if (is_built_in_class (sup_class))
         {
--- a/libinterp/octave-value/ov-classdef.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-classdef.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -522,7 +522,7 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).xstring_value ("fromName: invalid class name, expected a string value");
+      std::string name = args(0).xstring_value ("fromName: CLASS_NAME must be a string");
 
       retval(0) = to_ov (lookup_class (name));
     }
@@ -543,7 +543,7 @@
 
       if (! error_state)
         {
-          std::string meth_name = args(1).xstring_value ("fevalStatic: invalid method name, expected a string value");
+          std::string meth_name = args(1).xstring_value ("fevalStatic: method name must be a string");
 
           cdef_method meth = cls.find_method (meth_name);
 
@@ -560,7 +560,7 @@
             error ("fevalStatic: method not found: %s", meth_name.c_str ());
         }
       else
-        error ("fevalStatic: invalid object, expected a meta.class object");
+        error ("fevalStatic: first argument must be a meta.class object");
     }
   else
     error ("fevalStatic: invalid arguments");
@@ -580,7 +580,7 @@
 
       if (! error_state)
         {
-          std::string prop_name = args(1).xstring_value ("getConstant: invalid property name, expected a string value");
+          std::string prop_name = args(1).xstring_value ("getConstant: property name must be a string");
 
           cdef_property prop = cls.find_property (prop_name);
 
@@ -597,7 +597,7 @@
                    prop_name.c_str ());
         }
       else
-        error ("getConstant: invalid object, expected a meta.class object");
+        error ("getConstant: first argument must be a meta.class object");
     }
   else
     error ("getConstant: invalid arguments");
@@ -624,7 +624,7 @@
       if (! error_state) \
         retval(0) = FUN (CLSA, CLSB); \
       else \
-        error (#OP ": invalid objects, expected meta.class objects"); \
+        error (#OP ": arguments must be meta.class objects"); \
     } \
   else \
     error (#OP ": invalid arguments"); \
@@ -3281,7 +3281,7 @@
 
   if (args.length () == 1)
     {
-      std::string name = args(0).xstring_value ("fromName: invalid package name, expected a string value");
+      std::string name = args(0).xstring_value ("fromName: PACKAGE_NAME must be a string");
 
       retval(0) = to_ov (lookup_package (name));
     }
@@ -3823,7 +3823,7 @@
 
   if (args.length () == 1)
     {
-      std::string cname = args(0).xstring_value ("invalid package name, expected a string value");
+      std::string cname = args(0).xstring_value ("PACKAGE_NAME must be a string");
 
       retval = to_ov (lookup_package (cname));
     }
@@ -3858,7 +3858,7 @@
 
   if (args.length () == 1)
     {
-      std::string cls = args(0).xstring_value ("invalid class name, expected a string value");
+      std::string cls = args(0).xstring_value ("CLASS_NAME must be a string");
 
       retval = to_ov (lookup_class (cls));
     }
--- a/libinterp/octave-value/ov-cx-mat.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-cx-mat.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -320,7 +320,7 @@
 
       retval = mat.diag (m, n);
     }
-  else
+  else  // FIXME: Is this ever reachable?
     error ("diag: expecting vector argument");
 
   return retval;
--- a/libinterp/octave-value/ov-fcn-inline.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-fcn-inline.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -811,7 +811,7 @@
 
           for (int i = 1; i < nargin; i++)
             {
-              std::string s = args(i).xstring_value ("inline: expecting string arguments");
+              std::string s = args(i).xstring_value ("inline: additional arguments must be strings");
               fargs(i-1) = s;
             }
         }
@@ -838,7 +838,7 @@
 %!error <STR argument must be a string> inline (1)
 %!error <N must be an integer> inline ("2", ones (2,2))
 %!error <N must be a positive integer> inline ("2", -1)
-%!error <expecting string arguments> inline ("2", "x", -1, "y")
+%!error <additional arguments must be strings> inline ("2", "x", -1, "y")
 */
 
 DEFUN (formula, args, ,
--- a/libinterp/octave-value/ov-struct.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-struct.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -1809,7 +1809,7 @@
 
       if (nargin == 2)
         {
-          Array<std::string> cstr = args(1).xcellstr_value ("struct: expecting cell array of field names as second argument");
+          Array<std::string> cstr = args(1).xcellstr_value ("struct: second argument should be a cell array of field names");
 
           retval = octave_map (args(0).dims (), cstr);
         }
@@ -1825,7 +1825,7 @@
     {
       if (! args(i).is_string () || i + 1 >= nargin)
         {
-          error ("struct: expecting alternating \"field\", VALUE pairs");
+          error ("struct: additional arguments must occur as \"field\", VALUE pairs");
           return retval;
         }
     }
@@ -1909,8 +1909,8 @@
 %!assert (isstruct (x))
 %!assert (isempty (fieldnames (x)))
 %!fail ('struct ("a",{1,2},"b",{1,2,3})', 'dimensions of parameter 2 do not match those of parameter 4')
-%!fail ('struct (1,2,3,4)', 'struct: expecting alternating "field", VALUE pairs')
-%!fail ('struct ("1",2,"3")', 'struct: expecting alternating "field", VALUE pairs')
+%!error <arguments must occur as "field", VALUE pairs> struct (1,2,3,4)
+%!fail ('struct ("1",2,"3")', 'struct: additional arguments must occur as "field", VALUE pairs')
 */
 
 DEFUN (isstruct, args, ,
--- a/libinterp/octave-value/ov-usr-fcn.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/octave-value/ov-usr-fcn.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -635,7 +635,7 @@
           octave_value varargout_varval = symbol_table::varval ("varargout");
 
           if (varargout_varval.is_defined ())
-            varargout = varargout_varval.xcell_value ("expecting varargout to be a cell array object");
+            varargout = varargout_varval.xcell_value ("varargout must be a cell array object");
         }
 
       retval = ret_list->convert_to_const_vector (nargout, varargout);
--- a/liboctave/array/CMatrix.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/liboctave/array/CMatrix.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -3880,7 +3880,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg min expecting args of same size");
+        ("two-arg min requires same size arguments");
       return ComplexMatrix ();
     }
 
@@ -3968,7 +3968,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg max expecting args of same size");
+        ("two-arg max requires same size arguments");
       return ComplexMatrix ();
     }
 
--- a/liboctave/array/dMatrix.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/liboctave/array/dMatrix.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -3240,7 +3240,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg min expecting args of same size");
+        ("two-arg min requires same size arguments");
       return Matrix ();
     }
 
@@ -3307,7 +3307,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg max expecting args of same size");
+        ("two-arg max requires same size arguments");
       return Matrix ();
     }
 
--- a/liboctave/array/fCMatrix.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/liboctave/array/fCMatrix.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -3884,7 +3884,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg min expecting args of same size");
+        ("two-arg min requires same size arguments");
       return FloatComplexMatrix ();
     }
 
@@ -3972,7 +3972,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg max expecting args of same size");
+        ("two-arg max requires same size arguments");
       return FloatComplexMatrix ();
     }
 
--- a/liboctave/array/fMatrix.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/liboctave/array/fMatrix.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -3245,7 +3245,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg min expecting args of same size");
+        ("two-arg min requires same size arguments");
       return FloatMatrix ();
     }
 
@@ -3312,7 +3312,7 @@
   if (nr != b.rows () || nc != b.columns ())
     {
       (*current_liboctave_error_handler)
-        ("two-arg max expecting args of same size");
+        ("two-arg max requires same size arguments");
       return FloatMatrix ();
     }
 
--- a/liboctave/numeric/lo-specfun.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/liboctave/numeric/lo-specfun.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -3652,7 +3652,7 @@
   if (m < 0 || m > 1)
     {
       (*current_liboctave_warning_with_id_handler)
-        ("Octave:ellipj-invalid-m", "ellipj: expecting 0 <= M <= 1");
+        ("Octave:ellipj-invalid-m", "ellipj: invalid M value, required value 0 <= M <= 1");
 
       sn = cn = dn = lo_ieee_nan_value ();
 
--- a/scripts/general/curl.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/general/curl.m	Wed Nov 18 10:40:26 2015 -0800
@@ -78,7 +78,7 @@
     if (! size_equal (varargin{fidx}, varargin{fidx + 1}))
       error ("curl: size of X and Y must match");
     elseif (ndims (varargin{fidx}) != 2)
-      error ("curl: expected two-dimensional matrices X and Y");
+      error ("curl: X and Y must be 2-D matrices");
     elseif ((length (dx) != columns (varargin{fidx}))
          || (length (dy) != rows (varargin{fidx})))
       error ("curl: size of dx and dy must match the respective dimension of X and Y");
@@ -99,7 +99,7 @@
     if (! size_equal (varargin{fidx}, varargin{fidx + 1}, varargin{fidx + 2}))
       error ("curl: size of X, Y, and Z must match");
     elseif (ndims (varargin{fidx}) != 3)
-      error ("curl: expected two-dimensional matrices X, Y, and Z");
+      error ("curl: X, Y, and Z must be 2-D matrices");
     elseif ((length (dx) != size (varargin{fidx}, 2))
          || (length (dy) != size (varargin{fidx}, 1))
          || (length (dz) != size (varargin{fidx}, 3)))
--- a/scripts/general/divergence.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/general/divergence.m	Wed Nov 18 10:40:26 2015 -0800
@@ -77,7 +77,7 @@
     if (! size_equal (varargin{fidx},varargin{fidx + 1}))
       error ("divergence: size of X and Y must match");
     elseif (ndims (varargin{fidx}) != 2)
-      error ("divergence: expected two-dimensional matrices X and Y");
+      error ("divergence: X and Y must be 2-D matrices");
     elseif (length (dx) != columns (varargin{fidx})
             || length (dy) != rows (varargin{fidx}))
       error ("divergence: size of dx and dy must match the respective dimension of X and Y");
@@ -90,7 +90,7 @@
     if (! size_equal (varargin{fidx},varargin{fidx + 1},varargin{fidx + 2}))
       error ("divergence: size of X, Y, and Z must match");
     elseif (ndims (varargin{fidx}) != 3)
-      error ("divergence: expected two-dimensional matrices X, Y, and Z");
+      error ("divergence: X, Y, and Z must be 2-D matrices");
     elseif ((length (dx) != size (varargin{fidx}, 2))
          || (length (dy) != size (varargin{fidx}, 1))
          || (length (dz) != size (varargin{fidx}, 3)))
--- a/scripts/gui/private/__fltk_file_filter__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/gui/private/__fltk_file_filter__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -28,7 +28,7 @@
   retval = "";
   [r, c] = size (file_filter);
   if ((c == 0) || (c > 2))
-    error ("expecting 1 or to 2 columns for file filter cell");
+    error ("file filter cell must have 1 or 2 columns");
   endif
   fltk_str = "";
   for idx = 1 : r
--- a/scripts/gui/private/__uiobject_split_args__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/gui/private/__uiobject_split_args__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -41,7 +41,7 @@
   endif
 
   if (rem (length (args), 2))
-    error ("%s: expecting PROPERTY/VALUE pairs", who);
+    error ("%s: PROPERTY/VALUE arguments must occur in pairs", who);
   endif
 
   if (! isempty (args))
--- a/scripts/gui/uigetfile.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/gui/uigetfile.m	Wed Nov 18 10:40:26 2015 -0800
@@ -150,7 +150,7 @@
 
     ## check for even number of remaining arguments, prop/value pair(s)
     if (rem (nargin - stridx + 1, 2))
-      error ("uigetfile: expecting property/value pairs");
+      error ("uigetfile: PROPERTY/VALUE arguments must occur in pairs");
     endif
 
     for i = stridx : 2 : nargin
@@ -160,13 +160,13 @@
         if (ismatrix (val) && length (val) == 2)
           outargs{4} = val;
         else
-          error ("uigetfile: expecting 2-element vector for position argument");
+          error ('uigetfile: "Position" must be a 2-element vector');
         endif
       elseif (strcmpi (prop, "multiselect"))
         if (ischar (val))
           outargs{5} = tolower (val);
         else
-          error ("uigetfile: expecting string argument (on/off) for multiselect");
+          error ('uigetfile: MultiSelect value must be a string ("on"/"off")');
         endif
       else
         error ("uigetfile: unknown argument");
--- a/scripts/help/doc.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/help/doc.m	Wed Nov 18 10:40:26 2015 -0800
@@ -35,7 +35,7 @@
 ## Author: Soren Hauberg <soren@hauberg.org>
 ## Adapted-by: jwe
 
-function retval = doc (fname)
+function retval = doc (function_name)
 
   if (nargin == 0 || nargin == 1)
 
@@ -45,22 +45,22 @@
       ## Get the directory where the function lives.
       ## FIXME: Maybe we should have a better way of doing this?
 
-      if (ischar (fname))
-        ftype = exist (fname);
+      if (ischar (function_name))
+        ftype = exist (function_name);
       else
-        error ("doc: expecting argument to be a character string");
+        error ("doc: FUNCTION_NAME must be a string");
       endif
     else
-      fname = "";
+      function_name = "";
     endif
 
     ## if GUI is running, let it display the function
     if (isguirunning ())
-      __octave_link_show_doc__ (fname);
+      __octave_link_show_doc__ (function_name);
     else
 
       if (ftype == 2 || ftype == 3)
-        ffile = which (fname);
+        ffile = which (function_name);
       else
         ffile = "";
       endif
@@ -95,10 +95,10 @@
       cmd = sprintf ("\"%s\" --file \"%s\" --directory \"%s\"",
                      info_program (), info_file_name, info_dir);
 
-      have_fname = ! isempty (fname);
+      have_fname = ! isempty (function_name);
 
       if (have_fname)
-        status = system (sprintf ("%s --index-search \"%s\"", cmd, fname));
+        status = system (sprintf ("%s --index-search \"%s\"", cmd, function_name));
       endif
 
 
--- a/scripts/image/imshow.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/image/imshow.m	Wed Nov 18 10:40:26 2015 -0800
@@ -103,7 +103,7 @@
       error ("imshow: TrueColor image must be uint8, uint16, double, or single");
     endif
   else
-    error ("imshow: expecting MxN or MxNx3 matrix for image");
+    error ("imshow: image must be MxN or MxNx3 matrix");
   endif
 
   narg = 1;
@@ -257,7 +257,7 @@
 %!error <IM must be an image> imshow ({"cell"})
 %!error <TrueColor image must be uint8> imshow (ones (3,3,3, "uint32"))
 %!error <TrueColor image must be uint8> imshow (ones (3,3,3, "int16"))
-%!error <expecting MxN or MxNx3 matrix> imshow (ones (4,4,4))
+%!error <image must be MxN or MxNx3 matrix> imshow (ones (4,4,4))
 
 %!test
 %! hf = figure ("visible", "off");
--- a/scripts/linear-algebra/rref.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/linear-algebra/rref.m	Wed Nov 18 10:40:26 2015 -0800
@@ -41,7 +41,7 @@
   endif
 
   if (ndims (A) > 2)
-    error ("rref: expecting matrix argument");
+    error ("rref: A must be a 2-dimensional matrix");
   endif
 
   [rows, cols] = size (A);
--- a/scripts/linear-algebra/subspace.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/linear-algebra/subspace.m	Wed Nov 18 10:40:26 2015 -0800
@@ -37,7 +37,7 @@
   if (nargin != 2)
     print_usage ();
   elseif (ndims (A) != 2 || ndims (B) != 2)
-    error ("subspace: expecting A and B to be 2-dimensional arrays");
+    error ("subspace: A and B must be 2-dimensional arrays");
   elseif (rows (A) != rows (B))
     error ("subspace: column dimensions of A and B must match");
   endif
--- a/scripts/miscellaneous/edit.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/miscellaneous/edit.m	Wed Nov 18 10:40:26 2015 -0800
@@ -150,7 +150,7 @@
       ## of length 1 (by copying the input cell array)
       editfilelist = varargin(1);
     else
-      error ("edit: expected file to be a string or cell array of strings");
+      error ("edit: file NAME must be a string or cell array of strings");
     endif
   elseif (nargin == 2)
     ## User has supplied two arguments, these could be two file names,
@@ -182,7 +182,7 @@
         if (strcmp (stateval, "sync") || strcmp (stateval, "async"))
           FUNCTION.MODE = stateval;
         else
-          error ('edit: expected "edit MODE sync|async"');
+          error ("edit: MODE must be sync or async");
         endif
         return;
       case "EDITINPLACE"
--- a/scripts/miscellaneous/fileattrib.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/miscellaneous/fileattrib.m	Wed Nov 18 10:40:26 2015 -0800
@@ -84,7 +84,7 @@
       nfiles = length (files);
     endif
   else
-    error ("fileattrib: expecting first argument to be a character string");
+    error ("fileattrib: FILE must be a string");
   endif
 
   if (nargin == 0 || nargin == 1)
--- a/scripts/miscellaneous/open.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/miscellaneous/open.m	Wed Nov 18 10:40:26 2015 -0800
@@ -45,7 +45,7 @@
   endif
 
   if (! ischar (file))
-    error ("expecting argument to be a file name");
+    error ("open: FILE must be a string");
   endif
 
   [~, ~, ext] = fileparts (file);
--- a/scripts/miscellaneous/substruct.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/miscellaneous/substruct.m	Wed Nov 18 10:40:26 2015 -0800
@@ -67,7 +67,7 @@
       error ("substruct: for TYPE == ., SUBS must be a character string");
     endif
   else
-    error ('substruct: expecting TYPE to be one of "()", "{}", or "."');
+    error ('substruct: TYPE must be one of "()", "{}", or "."');
   endif
 
   retval = struct ("type", typ, "subs", sub);
--- a/scripts/plot/appearance/annotation.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/annotation.m	Wed Nov 18 10:40:26 2015 -0800
@@ -189,7 +189,7 @@
             && length (x) == 2 && length (y) == 2)
           lims = [x(1) y(1) diff(x) diff(y)];
         else
-          error ("annotation: expect 2 elements vectors for X and Y");
+          error ("annotation: X and Y must be 2-element vectors");
         endif
       else
         print_usage ();
@@ -202,11 +202,11 @@
         varargin(1) = [];
 
         if (! isvector (lims) || length (lims) != 4)
-          error ("annotation: expect 4 elements vector for POS")
+          error ("annotation: POS must be a 4-element vector");
         endif
       endif
     otherwise
-      error ("annotation: unknown annotation type %s", objtype)
+      error ("annotation: unknown annotation type %s", objtype);
   endswitch
 
   ## options
@@ -938,7 +938,7 @@
     headstyle = get (h, "head2style");
     pos = pos(1:2) .+ pos(3:4);
   else
-    error ("annotation: %d, no such arrow number")
+    error ("annotation: %d, no such arrow number");
   endif
 
   switch (headstyle)
@@ -968,7 +968,7 @@
       x = [0 0 0];
       y = [0 0 0];
     otherwise
-      error ("annotation: \"%s\" headstyle not implemented", headstyle)
+      error ("annotation: \"%s\" headstyle not implemented", headstyle);
   endswitch
 
   R = [cos(ang) -sin(ang);
@@ -1489,5 +1489,6 @@
 %!error annotation ([], "foo")
 %!error annotation ({})
 %!error annotation ("line", [.5 .6])
-%!error <expect 2 elements vectors for X and Y> annotation ("line", 1:3, 1:3)
-%!error <expect 4 elements vector for POS> annotation ("textbox", 1:3)
+%!error <X and Y must be 2-element vectors> annotation ("line", 1:3, 1:3)
+%!error <POS must be a 4-element vector> annotation ("textbox", 1:3)
+
--- a/scripts/plot/appearance/axis.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/axis.m	Wed Nov 18 10:40:26 2015 -0800
@@ -287,12 +287,12 @@
     len = length (ax);
 
     if (len != 2 && len != 4 && len != 6)
-      error ("axis: expecting vector with 2, 4, or 6 elements");
+      error ("axis: LIMITS vector must have 2, 4, or 6 elements");
     endif
 
     for i = 1:2:len
       if (ax(i) >= ax(i+1))
-        error ("axis: limits(%d) must be less than limits(%d)", i, i+1);
+        error ("axis: LIMITS(%d) must be less than LIMITS(%d)", i, i+1);
       endif
     endfor
 
--- a/scripts/plot/appearance/caxis.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/caxis.m	Wed Nov 18 10:40:26 2015 -0800
@@ -80,7 +80,7 @@
   elseif (isvector (ax))
     len = length (ax);
     if (len != 2)
-      error ("caxis: expecting vector with 2 elements");
+      error ("caxis: LIMITS must be a 2-element vector");
     endif
 
     set (ca, "clim", [ax(1), ax(2)]);
--- a/scripts/plot/appearance/datetick.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/datetick.m	Wed Nov 18 10:40:26 2015 -0800
@@ -132,10 +132,10 @@
   if (! isempty (form))
     if (isnumeric (form))
       if (! isscalar (form) || form < 0 || form != fix (form))
-        error ("datetick: expecting FORM argument to be a positive integer");
+        error ("datetick: FORM argument must be a positive integer");
       endif
     elseif (! ischar (form))
-      error ("datetick: expecting valid date format string");
+      error ("datetick: FORM argument must be a valid date format string");
     endif
   endif
 
--- a/scripts/plot/appearance/hidden.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/hidden.m	Wed Nov 18 10:40:26 2015 -0800
@@ -45,7 +45,7 @@
     print_usage ();
   elseif (nargin == 1)
     if (! ischar (mode))
-      error ("hidden: expecting MODE to be a string");
+      error ("hidden: MODE must be a string");
     elseif (! any (strcmpi (mode, {"on", "off"})))
       error ('hidden: MODE must be "on" or "off"');
     endif
--- a/scripts/plot/appearance/legend.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/legend.m	Wed Nov 18 10:40:26 2015 -0800
@@ -297,7 +297,7 @@
       varargin = arg;
       nargs = numel (varargin);
     else
-      error ("legend: expecting argument to be a character string");
+      error ("legend: single argument must be a string or cellstr");
     endif
   elseif (nargs > 1 && iscellstr (varargin{1}))
     ## Cell array of labels followed by property/value pairs
@@ -451,7 +451,7 @@
             break;  # k = 0, no further handles to process
           endif
         else
-          error ("legend: expecting argument to be a character string");
+          error ("legend: expecting argument to be a string");
         endif
       endfor
       if (have_labels && i < nargs)
--- a/scripts/plot/appearance/whitebg.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/appearance/whitebg.m	Wed Nov 18 10:40:26 2015 -0800
@@ -65,7 +65,7 @@
     isroot = false;
     fig = h;
   else
-    error ("expecting a figure handle");
+    error ("whitebg: HFIF must be a valid figure handle");
   endif
 
   axes = findall (fig, "type", "axes");
--- a/scripts/plot/draw/colorbar.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/draw/colorbar.m	Wed Nov 18 10:40:26 2015 -0800
@@ -109,7 +109,7 @@
           else
             ax = varargin{i++};
             if (! isscalar (ax) && ! isaxes (ax))
-              error ('colorbar: expecting an axes handle following "peer"');
+              error ('colorbar: invalid axes handle following "peer"');
             endif
           endif
         case {"north", "south", "east", "west",
--- a/scripts/plot/draw/private/__add_datasource__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/draw/private/__add_datasource__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -42,11 +42,12 @@
       if (ischar (val))
         set (h, arg, val);
       else
-        error ("%s: expecting data source to be a string", fcn);
+        error ("%s: datasource must be a string", fcn);
       endif
     else
       newargs{end + 1} = arg;
     endif
   endwhile
+
 endfunction
 
--- a/scripts/plot/draw/private/__ezplot__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/draw/private/__ezplot__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -140,7 +140,7 @@
       yarg = args{2};
     endif
   else
-    error ("%s: expecting string, inline function, or function handle", ezfunc);
+    error ("%s: F must be string, inline function, or function handle", ezfunc);
   endif
 
   if (nargin > 2 || (nargin == 2 && isplot))
@@ -222,7 +222,7 @@
           error ("%s: expecting a function of %d arguments", ezfunc, nargs);
         endif
       else
-        error ("%s: parametric plots expect 3 functions", ezfunc);
+        error ("%s: parametric plots require 3 functions", ezfunc);
       endif
     endif
   endif
@@ -257,7 +257,7 @@
     elseif (numel (arg) == 4)
       domain = arg(:).';
     else
-      error ("%s: expecting scalar, 2-, or 4-element vector", ezfunc);
+      error ("%s: expecting scalar N or 2-, 4-element vector DOM", ezfunc);
     endif
   endwhile
 
--- a/scripts/plot/draw/private/__pie__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/draw/private/__pie__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -29,7 +29,7 @@
   iarg = 3;
 
   if (! isvector (x))
-    error ("%s: expecting vector argument", caller);
+    error ("%s: X must be a vector", caller);
   endif
 
   len = length (x);
--- a/scripts/plot/util/__plt_get_axis_arg__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/__plt_get_axis_arg__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -34,7 +34,7 @@
       && ishandle (varargin{1}) && varargin{1} != 0 && ! isfigure (varargin{1}))
     htmp = varargin{1};
     if (! isaxes (htmp))
-      error ("%s: expecting first argument to be axes handle", caller);
+      error ("%s: first argument must be axes handle", caller);
     endif
     if (! strcmp (get (htmp, "tag"), "legend"))
       h = htmp;
@@ -52,7 +52,7 @@
         h = [ancestor(htmp, "axes"), htmp];
       endif
     else
-      error ("%s: expecting parent value to be axes handle", caller);
+      error ("%s: parent value must be an axes handle", caller);
     endif
   endif
 
--- a/scripts/plot/util/pan.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/pan.m	Wed Nov 18 10:40:26 2015 -0800
@@ -59,7 +59,7 @@
       varargin(1) = [];
       nargs--;
     else
-      error ("pan: expecting figure handle as first argument");
+      error ("pan: invalid figure handle HFIG");
     endif
   endif
 
--- a/scripts/plot/util/private/__print_parse_opts__.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Wed Nov 18 10:40:26 2015 -0800
@@ -168,7 +168,7 @@
     elseif (isfigure (arg))
       arg_st.figure = arg;
     else
-      error ("print: expecting inputs to be character string options or a figure handle");
+      error ("print: first argument must be string or figure handle");
     endif
   endfor
 
--- a/scripts/plot/util/rotate3d.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/rotate3d.m	Wed Nov 18 10:40:26 2015 -0800
@@ -54,7 +54,7 @@
       varargin(1) = [];
       nargs--;
     else
-      error ("rotate3d: expecting figure handle as first argument");
+      error ("rotate3d: invalid figure handle HFIG");
     endif
   endif
 
--- a/scripts/plot/util/subplot.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/subplot.m	Wed Nov 18 10:40:26 2015 -0800
@@ -148,7 +148,7 @@
       varargin(1) = [];
       initial_args_decoded = true;
     else
-      error ("subplot: expecting axes handle or RCN argument");
+      error ("subplot: invalid axes handle or RCN argument");
     endif
   endif
 
--- a/scripts/plot/util/zoom.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/plot/util/zoom.m	Wed Nov 18 10:40:26 2015 -0800
@@ -75,7 +75,7 @@
       varargin(1) = [];
       nargs--;
     else
-      error ("zoom: expecting figure handle as first argument");
+      error ("zoom: invalid figure handle HFIG");
     endif
   endif
 
--- a/scripts/polynomial/compan.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/polynomial/compan.m	Wed Nov 18 10:40:26 2015 -0800
@@ -65,7 +65,7 @@
   endif
 
   if (! isvector (c))
-    error ("compan: expecting a vector argument");
+    error ("compan: C must be a vector");
   endif
 
   n = length (c);
--- a/scripts/prefs/addpref.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/prefs/addpref.m	Wed Nov 18 10:40:26 2015 -0800
@@ -41,7 +41,7 @@
       prefs = loadprefs ();
       if (ischar (pref))
         if (isfield (group, pref))
-          error ("preference %s already exists in group %s", pref, group);
+          error ("addpref: preference %s already exists in group %s", pref, group);
         else
           prefs.(group).(pref) = val;
         endif
@@ -49,21 +49,21 @@
         if (size_equal (pref, val))
           for i = 1:numel (pref)
             if (isfield (group, pref{i}))
-              error ("preference %s already exists in group %s",
+              error ("addpref: preference %s already exists in group %s",
                      pref{i}, group);
             else
               prefs.(group).(pref{i}) = val;
             endif
           endfor
         else
-          error ("size mismatch for pref and val");
+          error ("addpref: size mismatch for PREF and VAL");
         endif
       else
-        error ("expecting pref to be a character string or cellstr");
+        error ("addpref: PREF must be a character string or cellstr");
       endif
       saveprefs (prefs);
     else
-      error ("expecting group to be a character string");
+      error ("addpref: GROUP must be a string");
     endif
   else
     print_usage ();
--- a/scripts/prefs/getpref.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/prefs/getpref.m	Wed Nov 18 10:40:26 2015 -0800
@@ -58,7 +58,7 @@
         retval = [];
       endif
     else
-      error ("expecting group to be a character string");
+      error ("getpref: GROUP must be a character string");
     endif
   elseif (nargin == 2 || nargin == 3)
     grp = getpref (group);
@@ -68,7 +68,7 @@
       elseif (nargin == 3)
         retval = default;
       else
-        error ("preference %s does not exist in group %s", pref, group);
+        error ("getpref: preference %s does not exist in group %s", pref, group);
       endif
     elseif (iscellstr (pref))
       if (nargin == 2 || size_equal (pref, default))
@@ -78,14 +78,14 @@
           elseif (nargin == 3)
             retval.(pref) = default{i};
           else
-            error ("preference %s does not exist in group %s", pref{i}, group);
+            error ("getpref: preference %s does not exist in group %s", pref{i}, group);
           endif
         endfor
       else
-        error ("size mismatch for pref and default");
+        error ("getpref: size mismatch for PREF and DEFAULT");
       endif
     else
-      error ("expecting pref to be a character string or cellstr");
+      error ("getpref: PREF must be a character string or cellstr");
     endif
   else
     print_usage ();
--- a/scripts/prefs/setpref.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/prefs/setpref.m	Wed Nov 18 10:40:26 2015 -0800
@@ -49,14 +49,14 @@
             prefs.(group).(pref{i}) = val;
           endfor
         else
-          error ("size mismatch for pref and val");
+          error ("setpref: size mismatch for PREF and VAL");
         endif
       else
-        error ("expecting pref to be a character string or cellstr");
+        error ("setpref: PREF must be a character string or cellstr");
       endif
       saveprefs (prefs);
     else
-      error ("expecting group to be a character string");
+      error ("setpref: GROUP must be a string");
     endif
   else
     print_usage ();
--- a/scripts/set/powerset.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/set/powerset.m	Wed Nov 18 10:40:26 2015 -0800
@@ -40,7 +40,7 @@
   byrows = false;
   if (nargin == 2)
     if (! strcmpi (byrows_arg, "rows"))
-      error ('powerset: expecting second argument to be "rows"');
+      error ('powerset: optional second argument must be "rows"');
     elseif (iscell (a))
       error ('powerset: "rows" not valid for cell arrays');
     else
@@ -103,7 +103,7 @@
 ## Test input validation
 %!error powerset ()
 %!error powerset (1,2,3)
-%!error <expecting second argument to be "rows"> powerset (1, "cols")
+%!error <second argument must be "rows"> powerset (1, "cols")
 %!error <"rows" not valid for cell arrays> powerset ({1}, "rows")
 %!error <cell arrays can only be used for character> powerset ({1})
 %!error <not implemented for more than 32 elements> powerset (1:33)
--- a/scripts/sparse/bicg.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/sparse/bicg.m	Wed Nov 18 10:40:26 2015 -0800
@@ -88,8 +88,7 @@
       Ax  = @(x) feval (A, x, "notransp");
       Atx = @(x) feval (A, x, "transp");
     else
-      error (["bicg: first argument is expected to " ...
-              "be a function or a square matrix"]);
+      error ("bicg: A must be a square matrix or function");
     endif
 
     if (nargin < 3 || isempty (tol))
@@ -116,8 +115,7 @@
       M1m1x  = @(x) feval (M1, x, "notransp");
       M1tm1x = @(x) feval (M1, x, "transp");
     else
-      error (["bicg: preconditioner is expected to " ...
-              "be a function or matrix"]);
+      error ("bicg: preconditioner must be a function or matrix");
     endif
 
     if (nargin < 6 || isempty (M2))
@@ -134,8 +132,7 @@
       M2m1x  = @(x) feval (M2, x, "notransp");
       M2tm1x = @(x) feval (M2, x, "transp");
     else
-      error (["bicg: preconditioner is expected to " ...
-              "be a function or matrix"]);
+      error ("bicg: preconditioner must be a function or matrix");
     endif
 
     Pm1x  = @(x) M2m1x  (M1m1x (x));
--- a/scripts/sparse/bicgstab.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/sparse/bicgstab.m	Wed Nov 18 10:40:26 2015 -0800
@@ -81,8 +81,7 @@
     elseif (isa (A, "function_handle"))
       Ax  = @(x) feval (A, x);
     else
-      error (["bicgstab: first argument is expected " ...
-              "to be a function or a square matrix"]);
+      error ("bicgstab: A must be a square matrix or function");
     endif
 
     if (nargin < 3 || isempty (tol))
@@ -102,8 +101,7 @@
     elseif (isa (M1, "function_handle"))
       M1m1x = @(x) feval (M1, x);
     else
-      error (["bicgstab: preconditioner is " ...
-              "expected to be a function or matrix"]);
+      error ("bicgstab: preconditioner must be a function or matrix");
     endif
 
     if (nargin < 6 || isempty (M2))
@@ -115,8 +113,7 @@
     elseif (isa (M2, "function_handle"))
       M2m1x = @(x) feval (M2, x);
     else
-      error (["bicgstab: preconditioner is "...
-              "expected to be a function or matrix"]);
+      error ("bicgstab: preconditioner must be a function or matrix");
     endif
 
     precon = @(x) M2m1x (M1m1x (x));
--- a/scripts/sparse/cgs.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/sparse/cgs.m	Wed Nov 18 10:40:26 2015 -0800
@@ -79,8 +79,7 @@
     elseif (isa (A, "function_handle"))
       Ax = @(x) feval (A, x);
     else
-      error (["cgs: first argument is expected to "...
-              "be a function or a square matrix"]);
+      error ("cgs: A must be a square matrix or function");
     endif
 
     if (nargin < 3 || isempty (tol))
@@ -100,7 +99,7 @@
     elseif (isa (M1, "function_handle"))
       M1m1x = @(x) feval (M1, x);
     else
-      error ("cgs: preconditioner is expected to be a function or matrix");
+      error ("cgs: preconditioner must be a function or matrix");
     endif
 
     if (nargin < 6 || isempty (M2))
@@ -112,7 +111,7 @@
     elseif (isa (M2, "function_handle"))
       M2m1x = @(x) feval (M2, x);
     else
-      error ("cgs: preconditioner is expected to be a function or matrix");
+      error ("cgs: preconditioner must be a function or matrix");
     endif
 
     precon = @(x) M2m1x (M1m1x (x));
--- a/scripts/sparse/qmr.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/sparse/qmr.m	Wed Nov 18 10:40:26 2015 -0800
@@ -101,8 +101,7 @@
       Ax  = @(x) A  * x;
       Atx = @(x) A' * x;
     else
-      error (["qmr: first argument is expected to " ...
-                "be a function or a square matrix"]);
+      error ("qmr: A must be a square matrix or function");
     endif
 
     if (nargin < 3 || isempty (tol))
@@ -129,8 +128,7 @@
       M1m1x  = @(x) M1  \ x;
       M1tm1x = @(x) M1' \ x;
     else
-      error (["qmr: preconditioner is expected to " ...
-                "be a function or matrix"]);
+      error ("qmr: preconditioner must be a function or matrix");
     endif
 
     if (nargin < 6 || isempty (M2))
@@ -147,8 +145,7 @@
       M2m1x  = @(x) M2  \ x;
       M2tm1x = @(x) M2' \ x;
     else
-      error (["qmr: preconditioner is expected to " ...
-                "be a function or matrix"]);
+      error ("qmr: preconditioner must be a function or matrix");
     endif
 
 
--- a/scripts/sparse/spaugment.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/sparse/spaugment.m	Wed Nov 18 10:40:26 2015 -0800
@@ -80,7 +80,7 @@
       c = max (max (abs (A))) / 1000;
     else
       if (ndims (A) != 2)
-        error ("spaugment: expecting 2-dimenisional matrix");
+        error ("spaugment: A must be a 2-D matrix");
       else
         c = max (abs (A(:))) / 1000;
       endif
--- a/scripts/special-matrix/pascal.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/special-matrix/pascal.m	Wed Nov 18 10:40:26 2015 -0800
@@ -49,7 +49,7 @@
   elseif (! (isscalar (n) && isscalar (t)))
     error ("pascal: N and T must be scalars");
   elseif (! any (t == [-1, 0, 1, 2]))
-    error ("pascal: expecting T to be -1, 0, 1, or 2, found %d", t);
+    error ("pascal: T must be -1, 0, 1, or 2, found %d", t);
   endif
 
   retval = zeros (n);
@@ -91,6 +91,6 @@
 %!error pascal (1,2,3)
 %!error <N and T must be scalars> pascal ([1 2])
 %!error <N and T must be scalars> pascal (1, [1 2])
-%!error <expecting T to be> pascal (3,-2)
-%!error <expecting T to be> pascal (3,4)
+%!error <T must be -1> pascal (3,-2)
+%!error <T must be .* or 2> pascal (3,4)
 
--- a/scripts/statistics/base/moment.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/statistics/base/moment.m	Wed Nov 18 10:40:26 2015 -0800
@@ -151,7 +151,7 @@
       type = opt2;
       dim = opt1;
     else
-      error ("moment: expecting TYPE to be a string");
+      error ("moment: TYPE must be a string");
     endif
   endif
 
@@ -199,7 +199,7 @@
 %!error <X must be a non-empty numeric matrix> moment (ones (2,0,3), 2)
 %!error <P must be a numeric scalar> moment (1, true)
 %!error <P must be a numeric scalar> moment (1, ones (2,2))
-%!error <expecting TYPE to be a string> moment (1, 2, 3, 4)
+%!error <TYPE must be a string> moment (1, 2, 3, 4)
 %!error <DIM must be an integer and a valid dimension> moment (1, 2, ones (2,2))
 %!error <DIM must be an integer and a valid dimension> moment (1, 2, 1.5)
 %!error <DIM must be an integer and a valid dimension> moment (1, 2, 4)
--- a/scripts/strings/cstrcat.m	Tue Nov 17 22:04:42 2015 +0100
+++ b/scripts/strings/cstrcat.m	Wed Nov 18 10:40:26 2015 -0800
@@ -52,7 +52,7 @@
   elseif (iscellstr (varargin))
     st = [varargin{:}];
   else
-    error ("cstrcat: expecting arguments to character strings");
+    error ("cstrcat: arguments must be character strings");
   endif
 
 endfunction
--- a/test/system.tst	Tue Nov 17 22:04:42 2015 +0100
+++ b/test/system.tst	Wed Nov 18 10:40:26 2015 -0800
@@ -225,7 +225,7 @@
 
 %!assert (ischar (file_in_path (path (), "date.m")))
 
-%!error <file_in_path: expecting option to be a string> file_in_path ("foo", "bar", 1)
+%!error <file_in_path: optional third argument must be a string> file_in_path ("foo", "bar", 1)
 %!error <Invalid call to file_in_path> file_in_path ()
 %!error <Invalid call to file_in_path> file_in_path ("foo", "bar", "baz", "ooka")