From e345db60f1f2fb365e02fdd5bceb61a058817967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wulf=20S=C3=B6lter?= Date: Fri, 15 Feb 2019 14:07:13 +1300 Subject: [PATCH 1/2] Extend logging of proceedToAfterExecSpinlocks Ties in with https://github.com/balderdashy/sails/issues/4502 and https://github.com/balderdashy/sails/issues/4400 While @mikermcneil has valid points that we *should* be using async/await, there are times when callbacks are still used and the message/trace inside `errCbArg` would otherwise be lost. --- lib/private/Deferred.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Deferred.js b/lib/private/Deferred.js index 08beefa..ac0bfdc 100644 --- a/lib/private/Deferred.js +++ b/lib/private/Deferred.js @@ -804,6 +804,10 @@ function proceedToAfterExecSpinlocks (errCbArg, resultCbArg, extraCbArgs, self, '```\n'+ flaverr.getBareTrace(self._omen)+'\n'+ '```\n'+ + 'And here is errCbArg:\n'+ + '```\n'+ + errCbArg+ + '```\n'+ '\n' ):'')+ ' [?] For more help, visit https://sailsjs.com/support\n'+ From f6553606596c65af96c089ac460f3080f04bb87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wulf=20S=C3=B6lter?= Date: Mon, 1 Apr 2019 11:25:14 +1300 Subject: [PATCH 2/2] Update Deferred.js - "Here is the original error" --- lib/private/Deferred.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Deferred.js b/lib/private/Deferred.js index ac0bfdc..303d186 100644 --- a/lib/private/Deferred.js +++ b/lib/private/Deferred.js @@ -804,7 +804,7 @@ function proceedToAfterExecSpinlocks (errCbArg, resultCbArg, extraCbArgs, self, '```\n'+ flaverr.getBareTrace(self._omen)+'\n'+ '```\n'+ - 'And here is errCbArg:\n'+ + 'Here is the original error:\n'+ '```\n'+ errCbArg+ '```\n'+