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

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

[Octave-bug-tracker] [bug #48194] lastwarn and lasterr produce wrong out


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48194] lastwarn and lasterr produce wrong outputs
Date: Fri, 10 Jun 2016 15:20:47 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Update of bug #48194 (project octave):

                  Status:                    None => Works For Me           

    _______________________________________________________

Follow-up Comment #1:

I think you've got a couple things turned around here, and you also don't show
your output (expect that someone else isn't seeing the same thing as you).

First, lasterr usage should be


[msg, id] = lasterr ();


so you got those switched around.

Second, I'm pretty sure "id" is not a valid error/warning identifier. I don't
see it documented in our help anywhere, but it has to contain at least one
colon, and no spaces.

So combining those two corrections, this works for me


>> try error("my:id", "1"); catch;  [msg, id] = lasterr (); disp(["id: " id]);
disp(["msg: " msg]); end
id: my:id
msg: 1
>> try error("my:id", "1"); catch;  err = lasterror (); disp(["id: "
err.identifier]); disp(["msg: " err.message]); end
id: my:id
msg: 1




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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