Mercurial > octave
changeset 28928:ae7ce8358953
maint: Add semicolon to end of all warning() and error() invocations.
* integral3.m, ordeig.m, camorbit.m, isosurface.m, profexport.m, bicg.m,
cgs.m, gmres.m, pcg.m, __alltohandles__.m, betaincinv.m, gammaincinv.m,
native2unicode.m, strsplit.m, compare_plot_demos.m, end.m, parent.m:
Add semicolon to end of all warning() and error() invocations.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 14 Oct 2020 07:58:12 -0700 |
parents | a53d887b24a1 |
children | 9e43deb9bfc3 |
files | scripts/general/integral3.m scripts/linear-algebra/ordeig.m scripts/plot/appearance/camorbit.m scripts/plot/draw/isosurface.m scripts/profiler/profexport.m scripts/sparse/bicg.m scripts/sparse/cgs.m scripts/sparse/gmres.m scripts/sparse/pcg.m scripts/sparse/private/__alltohandles__.m scripts/specfun/betaincinv.m scripts/specfun/gammaincinv.m scripts/strings/native2unicode.m scripts/strings/strsplit.m scripts/testfun/private/compare_plot_demos.m test/classes/@Snork/end.m test/ctor-vs-method/@parent/parent.m |
diffstat | 17 files changed, 29 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/integral3.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/general/integral3.m Wed Oct 14 07:58:12 2020 -0700 @@ -245,7 +245,7 @@ endif if (! is_function_handle (zb)) if (! (isreal (zb) && isscalar (zb))) - error ("integral3: ZB must be a real scalar or a function") + error ("integral3: ZB must be a real scalar or a function"); endif zb = @(x, y) zb * ones (size (y)); endif
--- a/scripts/linear-algebra/ordeig.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/linear-algebra/ordeig.m Wed Oct 14 07:58:12 2020 -0700 @@ -45,7 +45,7 @@ endif if (! isnumeric (A) || ! issquare (A)) - error ("ordeig: A must be a square matrix") + error ("ordeig: A must be a square matrix"); endif n = length (A);
--- a/scripts/plot/appearance/camorbit.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/plot/appearance/camorbit.m Wed Oct 14 07:58:12 2020 -0700 @@ -116,7 +116,7 @@ phi = varargin{2}; if (! (isnumeric (theta) && isscalar (theta) && isnumeric (phi) && isscalar (phi))) - error ("camorbit: THETA and PHI must be numeric scalars") + error ("camorbit: THETA and PHI must be numeric scalars"); endif if (nargin < 3) @@ -124,7 +124,7 @@ else coorsys = varargin{3}; if (! any (strcmpi (coorsys, {"data" "camera"}))) - error ("camorbit: COORSYS must be 'data' or 'camera'") + error ("camorbit: COORSYS must be 'data' or 'camera'"); endif endif
--- a/scripts/plot/draw/isosurface.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/plot/draw/isosurface.m Wed Oct 14 07:58:12 2020 -0700 @@ -307,7 +307,7 @@ colors = varargin{6}; otherwise - error ("isosurface: incorrect number of input arguments") + error ("isosurface: incorrect number of input arguments"); endswitch @@ -355,19 +355,19 @@ endif if (! isscalar (isoval)) - error ("isosurface: ISOVAL must be a scalar") + error ("isosurface: ISOVAL must be a scalar"); endif ## check colors if (! isempty (colors)) if (! size_equal (v, colors)) - error ("isosurface: COL must match the size of V") + error ("isosurface: COL must match the size of V"); endif if (nout == 2) warning ("isosurface: colors will be calculated, but no output argument to receive it"); endif elseif (nout >= 3) - error ("isosurface: COL must be passed to return C") + error ("isosurface: COL must be passed to return C"); endif endfunction
--- a/scripts/profiler/profexport.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/profiler/profexport.m Wed Oct 14 07:58:12 2020 -0700 @@ -77,7 +77,7 @@ endif if (! copyfile (__dataFilename ("style.css"), dir)) - error ("profexport: failed to copy data file to directory '%s'", dir) + error ("profexport: failed to copy data file to directory '%s'", dir); endif if (isempty (name))
--- a/scripts/sparse/bicg.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/sparse/bicg.m Wed Oct 14 07:58:12 2020 -0700 @@ -258,7 +258,7 @@ resvec(1) = norm (r0, 2); try - warning ("error", "Octave:singular-matrix", "local") + warning ("error", "Octave:singular-matrix", "local"); prec_r0 = M1fun (r0, "notransp", varargin{:}); # r0 preconditioned prec_s0 = s0; prec_r0 = M2fun (prec_r0, "notransp", varargin{:});
--- a/scripts/sparse/cgs.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/sparse/cgs.m Wed Oct 14 07:58:12 2020 -0700 @@ -229,7 +229,7 @@ rho_1 = rr' * r0; try - warning ("error","Octave:singular-matrix","local") + warning ("error","Octave:singular-matrix","local"); p_hat = feval (M1fun, p, varargin{:}); p_hat = feval (M2fun, p_hat, varargin {:}); catch
--- a/scripts/sparse/gmres.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/sparse/gmres.m Wed Oct 14 07:58:12 2020 -0700 @@ -270,7 +270,7 @@ maxit = 1; max_iter_number = min (size_b, 10); elseif (restart <= 0) || (maxit <= 0) - error ("gmres: MAXIT and RESTART must be positive integers") + error ("gmres: MAXIT and RESTART must be positive integers"); elseif (restart < size_b) && (empty_maxit) maxit = min (size_b / restart, 10); max_iter_number = maxit * restart; @@ -278,7 +278,7 @@ maxit = 1; max_iter_number = min (size_b, 10); elseif (restart > size_b) && (empty_maxit) - warning ("RESTART is %d but it should be bounded by SIZE(A,2).\n Setting restart to %d. \n", restart, size_b) + warning ("RESTART is %d but it should be bounded by SIZE(A,2).\n Setting restart to %d. \n", restart, size_b); restart = size_b; maxit = 1; max_iter_number = restart; @@ -291,7 +291,7 @@ maxit = size_b; max_iter_number = size_b; elseif (restart > size_b) && (! empty_maxit) - warning ("RESTART is %d but it should be bounded by SIZE(A,2).\n Setting restart to %d. \n", restart, size_b) + warning ("RESTART is %d but it should be bounded by SIZE(A,2).\n Setting restart to %d. \n", restart, size_b); restart = size_b; max_iter_number = restart * maxit; elseif (restart == size_b) && (maxit <= size_b)
--- a/scripts/sparse/pcg.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/sparse/pcg.m Wed Oct 14 07:58:12 2020 -0700 @@ -319,7 +319,7 @@ while (resvec(iter-1,1) > tol * b_norm && iter < maxit) if (iter == 2) # Check whether M1 or M2 are singular try - warning ("error","Octave:singular-matrix","local") + warning ("error","Octave:singular-matrix","local"); z = feval (M1fun, r, varargin{:}); z = feval (M2fun, z, varargin{:}); catch @@ -395,7 +395,7 @@ endif else eigest = [NaN, NaN]; - warning ('pcg: eigenvalue estimate failed: matrix not positive definite?') + warning ('pcg: eigenvalue estimate failed: matrix not positive definite?'); endif resvec(iter - 1, 2) = sqrt (r' * z); resvec = resvec (1:(iter-1), :);
--- a/scripts/sparse/private/__alltohandles__.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/sparse/private/__alltohandles__.m Wed Oct 14 07:58:12 2020 -0700 @@ -65,11 +65,11 @@ elseif (ischar (A)) Afun = str2func (A); elseif (! isnumeric (A) || ! issquare (A)) - error ([solver_name, ": A must be a square matrix or a function handle"]) + error ([solver_name, ": A must be a square matrix or a function handle"]); else A_is_numeric = true; if (size (A, 2) != size (b, 1)) - error ("__alltohandles__: dimension of B is not consistent with A") + error ("__alltohandles__: dimension of B is not consistent with A"); endif endif @@ -91,7 +91,7 @@ elseif (ischar (M1)) M1fun = str2func (M1); elseif (! isnumeric (M1) || ! issquare (M1)) - error ([solver_name, ": M1 must be a square matrix or a function handle"]) + error ([solver_name, ": M1 must be a square matrix or a function handle"]); else M1_is_numeric = true; endif @@ -114,7 +114,7 @@ elseif (ischar (M2)) M2fun = str2func (M2); elseif (! isnumeric (M2) || ! issquare (M2)) - error ([solver_name, ": M2 must be a square matrix or a function handle"]) + error ([solver_name, ": M2 must be a square matrix or a function handle"]); else M2_is_numeric = true; endif
--- a/scripts/specfun/betaincinv.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/specfun/betaincinv.m Wed Oct 14 07:58:12 2020 -0700 @@ -155,7 +155,7 @@ x(y == 0) = 1; x(y == 1) = 0; else - error ("betaincinv: invalid value for TAIL") + error ("betaincinv: invalid value for TAIL"); endif ## Special values have been already computed.
--- a/scripts/specfun/gammaincinv.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/specfun/gammaincinv.m Wed Oct 14 07:58:12 2020 -0700 @@ -148,7 +148,7 @@ q = y; p = 1 - q; else - error ("gammaincinv: invalid value for TAIL") + error ("gammaincinv: invalid value for TAIL"); endif todo = (a != 1) & (y != 0) & (y != 1);
--- a/scripts/strings/native2unicode.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/strings/native2unicode.m Wed Oct 14 07:58:12 2020 -0700 @@ -59,7 +59,7 @@ endif if (! ischar (codepage)) - error ("native2unicode: CODEPAGE must be a string") + error ("native2unicode: CODEPAGE must be a string"); endif ## FIXME: Would it be better to do this by converting to uint8? Or to
--- a/scripts/strings/strsplit.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/strings/strsplit.m Wed Oct 14 07:58:12 2020 -0700 @@ -187,7 +187,7 @@ if (! ischar (str) || (! ischar (del) && ! iscellstr (del))) error ("strsplit: S and DEL must be string values"); elseif (! isempty (str) && ! isrow (str)) - error ("strsplit: S must be a char row vector") + error ("strsplit: S must be a char row vector"); elseif (! isscalar (args.collapsedelimiters)) error ("strsplit: COLLAPSEDELIMITERS must be a scalar value"); endif
--- a/scripts/testfun/private/compare_plot_demos.m Wed Oct 14 07:27:13 2020 -0700 +++ b/scripts/testfun/private/compare_plot_demos.m Wed Oct 14 07:58:12 2020 -0700 @@ -68,17 +68,17 @@ if (ischar (arg.toolkits)) arg.toolkits = {arg.toolkits}; elseif (! iscellstr (arg.toolkits)) - error ('compare_plot_demos: Invalid value for "toolkits"') + error ('compare_plot_demos: Invalid value for "toolkits"'); endif if (ischar (arg.directories)) arg.directories = {arg.directories}; elseif (! iscellstr (arg.directories)) - error ('compare_plot_demos: Invalid value for "directory"') + error ('compare_plot_demos: Invalid value for "directory"'); endif if (! ischar (arg.fmt)) - error ('compare_plot_demos: Invalid value for "fmt"') + error ('compare_plot_demos: Invalid value for "fmt"'); endif ## Generate arg.fcn_file for rendering/saving the plot demo images
--- a/test/classes/@Snork/end.m Wed Oct 14 07:27:13 2020 -0700 +++ b/test/classes/@Snork/end.m Wed Oct 14 07:58:12 2020 -0700 @@ -1,7 +1,7 @@ function r = end (snk, index_pos, num_indices) if (num_indices ~= 1) - error ('Snork object may only have one index') + error ('Snork object may only have one index'); end r = length (snk.cack);
--- a/test/ctor-vs-method/@parent/parent.m Wed Oct 14 07:27:13 2020 -0700 +++ b/test/ctor-vs-method/@parent/parent.m Wed Oct 14 07:58:12 2020 -0700 @@ -8,7 +8,7 @@ %% copy constructor rot = a; otherwise - error ('type mismatch in parent constructor') + error ('type mismatch in parent constructor'); end end __trace__ ('end parent/parent');