Skip to content

Safari: Error#column is read only #1290

Closed
@ariya

Description

@ariya

This is related to #1284. See also: https://bugs.webkit.org/show_bug.cgi?id=146047

Some unit tests (that check for invalid syntax) fail on Safari. This is because column property of an Error object is read only.

Run this on Safari (or check this snippet: http://jsbin.com/pexocaruce/edit?js,console):

function createError(msg) {
  var error = new Error(msg);
  error.column = 42;
  console.log('error.column', error.column);
 return error;
}

function throwError(msg) {
  throw createError(msg);
}

try {
  throwError('Hello Universe');
} catch (e) {
  console.log('e.column', e.column);
}

It should say that column is 25, despite the fact that its value is set to 42. Chrome and Firefox behave as expected, showing 42.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions