Handling errors
One of the biggest problems that I encountered when first learning Gulp was how to handle it when something failed. Unfortunately, gulp doesn't have a clean way to handle errors, and when failures do occur, it doesn't handle them very gracefully. For example, let's say we have our watch task running in the background as we are editing a Sass file. We're typing away and styling our website, but we accidentally hit a key that the Sass
plugin wasn't expecting. Instead of failing through the code and just displaying the page break at that moment, Gulp will simply throw an error and the watch task will stop running.
The main problem with this is that you may not actually realize that Gulp has stopped and you will continue working on your code, only to realize moments later that all of your changes aren't being reflected on the page you are working on. It can cause a lot of confusion and end up wasting a lot of time until you know when to expect it.
The Gulp team acknowledge that...