You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.3 KiB

--- !ditz.rubyforge.org,2008-03-06/issue
title: improve fileName / lineNumber for errors thrown by builtin Duktape/C functions
desc: |-
Currently fileName will be undefined and lineNumber 0.
Example::
duk> try { (16).toString(165) } catch (err) {e=err}
= RangeError: number outside range
duk> e.fileName
= undefined
duk> e.lineNumber
= 0
The traceback is::
duk> (16).toString(165)
RangeError: number outside range
duk_api.c:1662
toString (null) native strict preventsyield
global input:1
The ``toString()`` built-in is a Duktape/C function with no fileName or
lineNumber information. Even if it did, the most useful file and line
would be the global input (as user doesn't see inside the built-in
implementation).
Perhaps built-in Duktape/C functions should have a flag indicating they
are internal, so that they can be ignored in tracebacks? If such a
flag were to exist, should use functions also be able to use one?
type: :task
component: duk
release: v0.9
reporter: sva <sami.vaarala@iki.fi>
status: :unstarted
disposition:
creation_time: 2013-11-11 23:00:13.297801 Z
references: []
id: e86bac0de2abc8636c72a1d2061cd7aa9db738b0
log_events:
- - 2013-11-11 23:00:13.481756 Z
- sva <sami.vaarala@iki.fi>
- created
- ""