Skip to content

Commit

Permalink
Don't throw a special error when handler provided to .tolerate() thro…
Browse files Browse the repository at this point in the history
…ws -- instead just allow it through unscathed.
  • Loading branch information
mikermcneil committed May 24, 2018
1 parent b915cfb commit 73a94ac
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/private/Deferred.js
Original file line number Diff line number Diff line change
Expand Up @@ -964,17 +964,9 @@ function proceedToInterceptsAndChecks (errCbArg, resultCbArg, extraCbArgs, self,
}, self._omen), resultCbArg, extraCbArgs, self, _cb, handleUncaughtException);
}
else {
// Otherwise, we'll just consider this a standard unexpected error:
return proceedToFinalAfterExecLC(flaverr({
name:
'UsageError',
message:
'Encountered unexpected error in `.'+matchingUserlandLC.type+'()` handler. '+
flaverr.parseOrBuildError(err).message+'\n'+
' [?] See https://sailsjs.com/support for help.',
raw:
err
}, self._omen), resultCbArg, extraCbArgs, self, _cb, handleUncaughtException);
// Otherwise, we'll allow this error through unscathed and treat it just like
// any unexpected error that might have been thrown by the implementation.
return proceedToFinalAfterExecLC(err, resultCbArg, extraCbArgs, self, _cb, handleUncaughtException);
}
}//•

Expand Down

0 comments on commit 73a94ac

Please sign in to comment.