Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Emit Better Error Message when JS Exception Not Caught #33

Open
IgnoredAmbience opened this issue Jul 20, 2015 · 3 comments
Open

Emit Better Error Message when JS Exception Not Caught #33

IgnoredAmbience opened this issue Jul 20, 2015 · 3 comments

Comments

@IgnoredAmbience
Copy link
Member

When an exception is thrown, we look for an $ERROR field on the thrown exception to output. I don't think we really ever set it there...

We ignore the $ERROR field on the global object where other useful information may have been placed.

We should probably output both, with better worded warnings.

@IgnoredAmbience IgnoredAmbience changed the title Emite Better Error Message when JS Exception Not Caught Emit Better Error Message when JS Exception Not Caught Jul 20, 2015
@PetarMax
Copy link
Contributor

In build_error, in the interpreter, the case when an error message is
passed is not treated because "we don't have to_string', but now we do (and
have had it for a while), so I will try to fix that. This message,
according to the spec, should go into the "message" own property of the
constructed error object, and this error object will later be thrown by
run_error. Perhaps we can then latch onto that.

On 20 July 2015 at 02:00, Thomas Wood [email protected] wrote:

When an exception is thrown, we look for an $ERROR field on the thrown
exception to output. I don't think we really ever set it there...

We ignore the $ERROR field on the global object where other useful
information may have been placed.

We should probably output both, with better worded warnings.


Reply to this email directly or view it on GitHub
#33.

@IgnoredAmbience
Copy link
Member Author

Yes, we're also getting a few cases of aborts due to that line not being implemented.

In general the OCaml front end is a bit untidy and needs some maintenance (along with the parser) -- I had been working on it in the 'targetjs' branch, but other priorities came along in April.

@IgnoredAmbience
Copy link
Member Author

FYI: I've fixed up a few issues with the NativeError initial heap objects, they were rather confused bcdabf9
I've probably broken the proof, but will look at that later when I've more time, it shouldn't be too hard to fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants