# HG changeset patch # User John W. Eaton # Date 1326058111 18000 # Node ID 2ff75e38c299747a62d6604f864dd977828c3190 # Parent c0ca47ab764161a014a4e4cab38e8bd13ab3ec36 improve error message in __gnuplot_print__ * __gnuplot_print__: Provide more meaningful error message if file name suffix is not recognized for pslatex terminal. diff -r c0ca47ab7641 -r 2ff75e38c299 scripts/plot/private/__gnuplot_print__.m --- a/scripts/plot/private/__gnuplot_print__.m Sun Jan 08 15:24:53 2012 -0500 +++ b/scripts/plot/private/__gnuplot_print__.m Sun Jan 08 16:28:31 2012 -0500 @@ -69,10 +69,13 @@ endif case {"epslatex", "pslatex", "pstex", "epslatexstandalone"} dot = find (opts.name == ".", 1, "last"); - if ((! isempty (dot)) - && any (strcmpi (opts.name(dot:end), - {".eps", ".ps", ".pdf", ".tex", "."}))) - name = opts.name(1:dot-1); + if (! isempty (dot)) + if (any (strcmpi (opts.name(dot:end), {".eps", ".ps", ".pdf", ".tex", "."}))) + name = opts.name(1:dot-1); + else + error ("print:invalid-suffix", "unrecognized file name suffix `%s' for %s output type", + opts.name(dot:end), lower (opts.devopt)); + endif endif if (strfind (opts.devopt, "standalone")) term = sprintf ("%s ",