Closed IMalyugin closed 1 year ago
Ready for review and merge on my side
How does this actually work? The try/catch isn't going to cover the callback, so it's only effectively covering this line:
It actually covers the handleFileLoad, that contains compile call.
I chose to catch as much as possible - so that any error thrown inside message handler gets handled. The rest is up to call stack propagation (or promise chain if there is async action going on).
Not sure if callback is covered, depends on whether babel.transformFile is synchronous (which is probably so)
Might as well reduce the coverage to that one babel OptionManager.init call, depends on your liking really. Either we catch all errors possible or we catch errors known to exist
@STRML Shall we get back to the matter at hand?
I can move try/catch closer to the Babel initialization and send the error over callback, if you think that's best.
Benefits:
Pitfalls:
Same check list :)