Nope, `doStuff().then(function(value)" != try`
A closer representation would be `try { var value = doStuff()` which has similar verbosity.
ES6 will have generators and "arrow" function syntax. Meaning:
doThing().then(function(value){
//blah blah blah
})
.catch(function(err){
//handle it
})
becomes either: try {
var value = yield doThing();
//blah blah blah
} catch (err) {
//handle it
}
or doThing().then(value => /* blah blah blah */)
.catch(err => /* handle it */);
meaning you can pick your paradigm :) Except that the functional one composes slightly better, perhaps. doThing().then(value => /* blah blah blah */)
.catch(only(ParseError, err => /* handle it */));
vs try {
var value = yield doThing();
//blah blah blah
} catch (err) {
only(err, ParseError); // argument repetition
//handle it
}