Standard errors types with file line info ?

# Irakli Gozalishvili (13 years ago)

My apologies if that's being already discussed (have not being following this list actively lately). I would be really love if error types could be standardised such that fileName, lineNumber information could be taken from them reliably.

It would be also great if error.stack was in JSON structure instead of string that is not easy to work with. It would be yet even better if optional fileName, lineNumber, columnNumber could be specified at / post error construction time, for example spidermonkey already has support for this: developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error

-- Irakli Gozalishvili Web: www.jeditoolkit.com

# Rick Waldron (13 years ago)

On Thursday, February 28, 2013, Irakli Gozalishvili wrote:

Hi,

My apologies if that's being already discussed (have not being following this list actively lately). I would be really love if error types could be standardised such that fileName, lineNumber information could be taken from them reliably.

It would be also great if error.stack was in JSON structure instead of string that is not easy to work with. It would be yet even better if optional fileName, lineNumber, columnNumber could be specified at / post error construction time, for example spidermonkey already has support for this:

developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error

IIRC, Arv was working on this here: strawman:error_stack