octave-maintainers
[Top][All Lists]
Advanced

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

lastwarn vs. lasterr


From: rik
Subject: lastwarn vs. lasterr
Date: Tue, 28 Apr 2015 09:05:06 -0700

All,

I started to pull on a small bug in fail.m and dislodged something more
major.  The message that is stored by calling warning () includes the
prefix "warning: " while the message stored by calling error () does not
include the prefix "error :".

--- Sample Code ---
octave:58> warning ("foobar")
warning: foobar
octave:59> lastwarn
ans = warning: foobar

octave:60> error ("foobar")
error: foobar
octave:60> lasterr
ans = foobar
--- End Code ---

Is there any reason why these should be different?  What does Matlab do?

My preference would be to change it so that warning does not include the
prefix.  This is a relatively easy change in error.cc.

--Rik





reply via email to

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