Not sure how feasible of an approach this would be but it would be nice to have a list of returned, but un-handled, promises pop up as warnings at compile time - and/or if catchError is missing.
function abc() {
var def = new Deferred<String>();
....
return def.promise();
}
abc();
Would then come up with a compile warning that abc() is missing a .catchError() ( and .then() ).
You probably can't do this at compile time, but it may be possible in runtime. This behavior would add overhead, but perhaps it could be done as a flag. I'll leave this open and think about it.
Not sure how feasible of an approach this would be but it would be nice to have a list of returned, but un-handled, promises pop up as warnings at compile time - and/or if catchError is missing.
Would then come up with a compile warning that
abc()
is missing a.catchError()
( and.then()
).