changeset 27731:f9c334a207bb

Fix old legend code to pass new BIST tests (bug #57288). * __gnuplot_legend__.m: Add "Octave:invalid-fun-call" error id to two calls to error() to allow BIST tests to pass.
author Rik <rik@octave.org>
date Thu, 21 Nov 2019 12:54:55 -0800
parents 5b9067c17e4b
children da163456abb3
files scripts/plot/appearance/private/__gnuplot_legend__.m
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/private/__gnuplot_legend__.m	Sat Dec 15 12:53:18 2018 +0100
+++ b/scripts/plot/appearance/private/__gnuplot_legend__.m	Thu Nov 21 12:54:55 2019 -0800
@@ -340,7 +340,8 @@
       varargin = arg;
       nargs = numel (varargin);
     else
-      error ("legend: single argument must be a string or cellstr");
+      error ("Octave:invalid-fun-call",
+             "legend: single argument must be a string or cellstr");
     endif
 
   elseif (nargs > 1 && iscellstr (varargin{1}))
@@ -460,7 +461,8 @@
       for i = 1 : nargs
         label = varargin{i};
         if (! ischar (label))
-          error ("legend: expecting label to be a string");
+          error ("Octave:invalid-fun-call",
+                 "legend: expecting label to be a string");
         endif
         ## Locate an object which can be labeled
         while (k > 0)