# HG changeset patch # User Juan Pablo Carbajal (desktop) # Date 1351026573 -7200 # Node ID 6f3363ff368c8a82d65df0ac24d3d8b390b5bd8c # Parent 8e6a72cac999ed3346d3b37d70f7c5ea82301c0f print_usage.m: Adding error identifiers. diff --git a/scripts/help/print_usage.m b/scripts/help/print_usage.m --- a/scripts/help/print_usage.m +++ b/scripts/help/print_usage.m @@ -33,14 +33,15 @@ if (numel (x) > 1) name = x (2).name; else - error ("print_usage: invalid function\n"); + error ("Octave:invalid-context", "print_usage: invalid function\n"); endif fullpath = evalin ("caller", "mfilename (""fullpath"")"); if (strcmp (fullpath(end-length(name)+1:end), name)) fullname = [fullpath, ".m"]; endif elseif (!ischar (name)) - error ("print_usage: input argument must be a string"); + error ("Octave:invalid-input-arg", + "print_usage: input argument must be a string"); else fullname = name; endif @@ -73,7 +74,7 @@ endif if (at_toplev) - error ("Invalid call to %s. Correct usage is:\n\n%s\n%s", + error ("Octave:invalid-fun-call", "Invalid call to %s. Correct usage is:\n\n%s\n%s", name, usage_string, __additional_help_message__ ()); else msg = sprintf ("Invalid call to %s. Correct usage is:\n\n%s", @@ -84,7 +85,7 @@ msg(end) = " "; endif - error (msg); + error ("Octave:invalid-fun-call", msg); endif endfunction @@ -139,4 +140,3 @@ ## Stop reporting function as missing tests. No good tests possible. %!assert (1) -