[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stupid question on error messages
From: |
Søren Hauberg |
Subject: |
Stupid question on error messages |
Date: |
Sun, 03 Jun 2007 14:09:33 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070403) |
Hi,
In general I really like the traceback information provided by Octave
when an error occurs, but I do find it a bit to verbose. As an example
consider the following function
function f(a)
for i = 1:10
if (a == i)
svd("bad argument")
endif
endfor
endfunction
If I call this with 'f(y)' I get the following error:
error: svd: wrong type argument `string'
error: evaluating if command near line 3, column 5
error: evaluating for command near line 2, column 3
error: called from `f' in file `/home/sh/f.m'
Now, I'm wondering how the second and third line of the error message
helps me? In general I don't care about which if-statement contains the
body that caused the error. Instead I care about the line of code that
contains the error. So instead I'd prefer the error message to be
something like
error: svd: wrong type argument `string'
error: called from `f' in file `/home/sh/f.m' at line 4
As you guys in general are smarter than me, I assume there is a very
good reason for the current error message. I was just wondering what
that reason is...
Søren
- Stupid question on error messages,
Søren Hauberg <=