help-octave
[Top][All Lists]
Advanced

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

lasterror (stack.name)


From: gOS
Subject: lasterror (stack.name)
Date: Wed, 4 Jun 2008 07:08:18 -0700 (PDT)

I've noticed that when I run a mex file (foo.mex) and have it call
mexErrMsgIdAndTxt('component:mnemonic','message'), that I am receiving
unexpected values from last error.

For the sake of this example, assume moo.m calls foo.

function moo

  output = foo(input)
  le = lasterror

end
=========================

le =
{
   message = error: foo: message
   identifier = component:mnemonic
   stack =
   {
      file = C:\file\blah\...\moo.m
      name = moo
      line = 3
      column = 8
   }
}

===============

As you can see, foo is referenced in the error message, but does not get
credit in the stack. Instead, moo is determined to be the offending
function. I understand line & column would not have values when referencing
a mex function, but it makes writing a function like handleError() a little
more difficult if I can't trust the stack to always return the correct
information or if I have to parse message to find out what the actual
function was that crashed.

I suppose, its possible to program all the desired information into the
identifier when using mex files, but I still wanted to check if this was the
expected behavior.
-- 
View this message in context: 
http://www.nabble.com/lasterror-%28stack.name%29-tp17647642p17647642.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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