Mercurial > octave
diff scripts/image/imformats.m @ 28905:89a425f2c202
maint: Use Octave convention that error() messages don't end with a period.
* __magick_read__.cc, graphics.cc, input.cc, sysdep.cc, cdef-object.cc,
profiler.cc, __uiobject_split_args__.m, imformats.m, ind2rgb.m, strread.m,
edit.m, nargoutchk.m, display_info_file.m, substruct.m, configure_make.m,
camlookat.m, camorbit.m, copyobj.m, graphics_toolkit.m, __print_parse_opts__.m,
ichol.m, ilu.m, gallery.m, strtok.m:
Delete period from end of messages used in calls to error().
author | Rik <rik@octave.org> |
---|---|
date | Tue, 13 Oct 2020 13:47:55 -0700 |
parents | 28de41192f3c |
children | 0de38a6ef693 |
line wrap: on
line diff
--- a/scripts/image/imformats.m Tue Oct 13 13:24:54 2020 -0700 +++ b/scripts/image/imformats.m Tue Oct 13 13:47:55 2020 -0700 @@ -92,7 +92,7 @@ switch (tolower (arg1)) case "add", if (! isstruct (arg2)) - error ("imformats: FORMAT to %s must be a structure.", arg1); + error ("imformats: FORMAT to %s must be a structure", arg1); endif arrayfun (@is_valid_format, arg2); formats(end + 1: end + numel (arg2)) = arg2; @@ -100,21 +100,21 @@ case {"remove", "update"}, if (! ischar (arg2)) - error ("imformats: EXT to %s must be a string.", arg1); + error ("imformats: EXT to %s must be a string", arg1); endif ## FIXME: suppose a format with multiple extensions. If one of ## them is requested to be removed, should we remove the ## whole format, or just that extension from the format? match = find_ext_idx (formats, arg2); if (! any (match)) - error ("imformats: no EXT '%s' found.", arg2); + error ("imformats: no EXT '%s' found", arg2); endif if (strcmpi (arg1, "remove")) formats(match) = []; else ## then it's update if (! isstruct (arg3)) - error ("imformats: FORMAT to update must be a structure."); + error ("imformats: FORMAT to update must be a structure"); endif is_valid_format (arg3); formats(match) = arg3; @@ -135,7 +135,7 @@ endif endswitch else - error ("imformats: first argument must be either a structure or string."); + error ("imformats: first argument must be either a structure or string"); endif else varargout{1} = formats; @@ -269,7 +269,7 @@ min_fields = {"ext", "read", "isa", "write", "info", "alpha", "description"}; fields_mask = isfield (format, min_fields); if (! all (fields_mask)) - error ("imformats: structure has missing field '%s'.", min_fields(! fields_mask){1}); + error ("imformats: structure has missing field '%s'", min_fields(! fields_mask){1}); endif endfunction