I observed that while error.name is empty regularly, some browsers prepend it to the message.
E.g. when having
throw new DOMException("INDEX_SIZE_ERR");
Those are the observed values:
Opera 12.12
Name: null
Message: Uncaught exception: Error: DOMException: INDEX_SIZE_ERR
Android Browser 4.2 + 4.4
Name: null
Message: Uncaught DOMException: INDEX_SIZE_ERR
Edge 12 + 13
Name: null
Message: DOMException: INDEX_SIZE_ERR
Or when having this:
I saw this in the logs:
Safari 9
Name: null
Message: Error: Foo
I also observed native errors like this:
Safari 9
Name: null
Message: TypeError: foo.bar is not a function
Is there any interest in normalizing this stuff in TraceKit? I think we could parse the names out of the message quite easily using some RegEx magic.
I could implement this if it is something you would include in TraceKit.
I observed that while
error.nameis empty regularly, some browsers prepend it to the message.E.g. when having
Those are the observed values:
Opera 12.12
Name:
nullMessage:
Uncaught exception: Error: DOMException: INDEX_SIZE_ERRAndroid Browser 4.2 + 4.4
Name:
nullMessage:
Uncaught DOMException: INDEX_SIZE_ERREdge 12 + 13
Name:
nullMessage:
DOMException: INDEX_SIZE_ERROr when having this:
I saw this in the logs:
Safari 9
Name:
nullMessage:
Error: FooI also observed native errors like this:
Safari 9
Name:
nullMessage:
TypeError: foo.bar is not a functionIs there any interest in normalizing this stuff in TraceKit? I think we could parse the names out of the message quite easily using some RegEx magic.
I could implement this if it is something you would include in TraceKit.