nucleartide / ember-elm

Write Elm in your Ember app
https://medium.com/@nucleartide/introducing-ember-elm-d47f2af73aff
Other
55 stars 7 forks source link

Verify error message contains path before parsing #13

Closed MattCheely closed 7 years ago

MattCheely commented 7 years ago

When trying to import a module that doesn't exist, elm-make returns an error that doesn't contain a path. That caused the regex exec to return null, and destructuring to fail. At that point the plugin throws an exception, and the actual root cause is masked. This prevents that failure mode, allowing the message to display unaltered if the path regex doesn't match.

MattCheely commented 7 years ago

Any chance of this merging?

nucleartide commented 7 years ago

@MattCheely Woah sorry, I just noticed this PR. Strangely I didn't get notified about it at all, it seems you have to watch a repo to be notified?

In any case, this looks good - going to merge. Thanks!