Let's say I have the following task modifying my Alloy compile process (alloy.jmk build configuration file)
task("pre:compile", function (e, log) {
// execute something that may throw an error
try {
// ...
}
catch(err) {
// do some custom error handling
// ...
// !!! need to stop the build here !!!
}
log.info("My task completed!");
});
How can I stop the build in the catch-clause? Of course I could just remove the try-catch but then my custom error handling won't be executed...