There only a column offset on the first line of a file. That's because of the way node loads modules. If you want correct stack traces, you can skip the first line or... don't minify javascript that throws.
On Saturday, 25 May 2013 19:41:41 UTC+2, per.ro...@factor10.com wrote: > > Hi, > > I have the following minified script code: > > var start=function(){function n(n){return n.length}function t(t){return > 42+n(t)}function r(n){return t(n.x)}function u(n){return r(n)}return > u}();start({x:null}); > > It's 163 characters long. When I run it with Node version 0.10.8, I get > the following stack trace: > > c:\temp\sourcemap-test\script.min.js:1 > __filename, __dirname) { var start=function(){function n(n){return > n.length}fu > ^ > TypeError: Cannot read property 'length' of null > at n (c:\temp\sourcemap-test\script.min.js:1:106) > at t (c:\temp\sourcemap-test\script.min.js:1:138) > at r (c:\temp\sourcemap-test\script.min.js:1:164) > at u (c:\temp\sourcemap-test\script.min.js:1:192) > at Object.<anonymous> (c:\temp\sourcemap-test\script.min.js:1:209) > at Module._compile (module.js:456:26) > at Object.Module._extensions..js (module.js:474:10) > at Module.load (module.js:356:32) > at Function.Module._load (module.js:312:12) > at Function.Module.runMain (module.js:497:10) > > Note the column offsets; they are clearly wrong since some of them are > greater than the length of the line. > > I can see from the error preview that Node wraps my code. But shouldn't it > adjust the column offsets accordingly? > > Thanks, > Per > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.