Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Fix for error handling in latest version of traceur #457

Merged
merged 1 commit into from
Dec 27, 2015

Conversation

BennettJames
Copy link

Previously, Traceur would return an array of errors when several were detected during compilation. The module loader would just report the first. In 0.9.3 though, Tracuer was updated to instead throw a single MultipleErrors type that contains all the errors inside it.

The module loader currently just reports "undefined" as the error, as there is no array with elements, making for a rather opaque error when a compilation error occurs.

This modifies it to still throw the first element when dealing with an array for backwards compatibility, but will otherwise throw the full exception.

detected during compilation. The module loader would just report the
first. In 0.9.3 though, Tracuer was updated to instead throw a single
"MultipleErrors" type that contained all the errors inside it.

The module loader currently just reports "undefined" as the error, as
there is no array with elements, making for a rather opaque error when
a compilation error occurs.

This modifies it to still throw the first element when dealing with an
array for backwards compatibility, but will otherwise throw the full
exception.
guybedford added a commit that referenced this pull request Dec 27, 2015
Fix for error handling in latest version of traceur
@guybedford guybedford merged commit 6187526 into ModuleLoader:master Dec 27, 2015
@guybedford
Copy link
Member

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants