kokizzu / plv8js

Automatically exported from code.google.com/p/plv8js
Other
0 stars 0 forks source link

error.stack missing line numbers on some servers #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to figure out why plv8's error.stack is missing the line numbers on 
some servers, but show up fine on others.

What steps will reproduce the problem?
1. Run this query:

DO $$
  try {
    plv8.elog(ERROR , 'plv8 version = ', plv8.version);
  } catch (err) {
    plv8.elog(WARNING , err.stack);
  }
$$ language plv8;

What is the expected output? 
On some servers, the output is this:

WARNING:  Error: plv8 version =  1.4.0
    at null.<anonymous> (<anonymous>:4:10)
Query returned successfully with no result in 15 ms.

Note the "<anonymous>:4:10" is referencing the 4th line, 10th column.

What do you see instead?
On other servers, the output is this:

WARNING:  Error: plv8 version =  1.4.0
    at [object Object].<anonymous> (unknown source)
Query returned successfully with no result in 15 ms.

Note the "unknown source". It doesn't show any line numbers.

What version of the product are you using? On what operating system?
plv8 version 1.4.0
PostgreSQL 9.1
Ubuntu 12.04

Please provide any additional information below.
I have mirrored the postgresql.conf file. I have checked that the plv8 versions 
are the same. I've restarted PostgreSQL. I've verified the same extensions are 
installed on both servers.

Any idea how I can get the line numbers to show up?

Original issue reported on code.google.com by ben...@gmail.com on 10 Jun 2014 at 4:53

GoogleCodeExporter commented 9 years ago
Once difference I've noticed is this:

dpkg -s postgresql-9.1-plv8

On the servers that do include the line numbers:
Version: 1.4.0-1

On the servers that do not include the line numbers:
Version: 1.4.2.ds-1.pgdg12.4+1

Original comment by ben...@gmail.com on 10 Jun 2014 at 5:53

GoogleCodeExporter commented 9 years ago
I've verified that changing the package on the server to plv8 Version: 1.4.0-1 
and V8 to Version: libv8-3.16.5_3.16.5-1 fixes the issue and line numbers are 
now shown.

What has changed between the plv8 and V8 versions to remove line numbers from 
error.stack?

Original comment by ben...@gmail.com on 10 Jun 2014 at 6:14