help-octave
[Top][All Lists]
Advanced

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

lasterror (stack.name)


From: John W. Eaton
Subject: lasterror (stack.name)
Date: Wed, 04 Jun 2008 11:44:26 -0400

On  4-Jun-2008, gOS wrote:

| 
| 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.

What does Matlab do?

If you think you've found a bug, then please submit a complete bug
report to the address@hidden list, including the code necessary to
reproduce the error, so we don't have to guess or duplicate that
effort.

jwe


reply via email to

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