telerik / mobile-cli-lib

Contains common infrastructure for CLIs - mainly AppBuilder, NativeScript, DDB and Proton.
Apache License 2.0
11 stars 10 forks source link

Fix infinite loop of unhandled rejections #998

Closed rosen-vladimirov closed 7 years ago

rosen-vladimirov commented 7 years ago

In case the code inside our unhandled rejection handler fails, it will throw another unhandled rejection and we may end up with infinite loop. In this case try-catch the whole code inside the unhandled rejection and in case error is arised, exit the process. We cannot console.log the error as even this operation might fail.