Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the 2nd number after the colon in a node.js stack trace line mean?

In a node.js stack trace there are always two numbers, the line number then a : and another number. In the example below, the first line has faye-redis.js:153:36 and 153 is the line number in that file for where the error is occurring, but what does the number :36 mean?

node_modules/faye-redis/faye-redis.js:153:36 • publish.notify
node_modules/faye-redis/faye-redis.js:72:16 • clientExists
node_modules/redis/index.js:532:9 • try_callback
node_modules/redis/index.js:614:13 • return_reply
node_modules/redis/index.js:266:14 • RedisClient.init_parser
events.js:96:17 • EventEmitter.emit
node_modules/redis/lib/parser/hiredis.js:43:18 • execute
node_modules/redis/index.js:488:27 • on_data
node_modules/redis/index.js:82:14 • none
events.js:96:17 • EventEmitter.emit
net.js:397:14 • onread
like image 877
Andrew Arrow Avatar asked May 03 '13 19:05

Andrew Arrow


People also ask

What does stack trace mean in JavaScript?

A stack trace is a list of the functions, in order, that lead to a given point in a software program. A stack trace is essentially a breadcrumb trail for your software. You can easily see the stack trace in JavaScript by adding the following into your code: console. trace();

What is stack trace in node JS?

The stack trace is useful while debugging code as it shows the exact point that has caused an error. Errors in Node. js can be classified into four broad categories: Standard JavaScript Errors.

What is node js stack overflow?

js—it is the most popular non-language, non-database development tool. It allows you to run JavaScript on the server side, which lets software engineers develop on the full web stack. Node. js's popularity has snowballed for good reason. Node.


1 Answers

The first number is the row (line number), the second is the column (character on line). In Javascript many coders habitually nest a lot of code on a single line with closures et al, or use minifiers like YUI compressor, so it's often rather relevant information.

like image 128
Niels Keurentjes Avatar answered Sep 21 '22 13:09

Niels Keurentjes