octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41484] change error message from validatestri


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #41484] change error message from validatestring to follow Octave guidelines
Date: Thu, 06 Feb 2014 18:55:41 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131030 Firefox/17.0 Iceweasel/17.0.10

URL:
  <http://savannah.gnu.org/bugs/?41484>

                 Summary: change error message from validatestring to follow
Octave guidelines
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Thu 06 Feb 2014 18:55:40 GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The function validatestring accepts an input string and a list of valid, and
returns the one from the list that gives the best match, or throws an error if
there's no good match.

I would like to change the error message so that it follows Octave's guideline
better. This allows for Octave and Octave Forge functions to use it.
Consider:


octave> b = validatestring ("foo", {"bar", "qux"}, "func", "VARNAME")
error: validatestring: Function: func Variable: VARNAME:
'foo' does not match any of
bar, qux
error: called from:
error:   /usr/local/share/octave/3.8.0/m/strings/validatestring.m at line 118,
column 5


The start of the message suggests that it's an error in validatestring but
what really happens is that validatestring() is throwing an error by
instruction of "func". Also, to make it look more Octavish, I would like to
replace it with:


error: func: VARNAME must match one the following:
bar, qux


Should I try to make this change?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41484>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]