exit correctly when a fatal error happens
exit correctly when a fatal error happens

fixes #3464

cesarandreu/webpack,cesarandreu/webpack,nkzawa/webpack,halfzebra/webpack,halfzebra/webpack,nkzawa/webpack,NekR/webpack,SimenB/webpack,EliteScientist/webpack,g0ddish/webpack,cesarandreu/webpack,pugnascotia/webpack,jescalan/webpack,rlugojr/webpack,SimenB/webpack,webpack/webpack,nkzawa/webpack,ts-webpack/webpack,NekR/webpack,ts-webpack/webpack,jescalan/webpack,webpack/webpack,ts-webpack/webpack,g0ddish/webpack,rlugojr/webpack,webpack/webpack,ts-webpack/webpack,SimenB/webpack,pugnascotia/webpack,halfzebra/webpack,jescalan/webpack,g0ddish/webpack,rlugojr/webpack,EliteScientist/webpack,webpack/webpack,pugnascotia/webpack,SimenB/webpack