Add args and return value to patcher if it failed to run

pull/69/head
LavaSquids 3 years ago
parent ed735105dc
commit 4c257201c5

@ -14,7 +14,7 @@ export function runPatches (patches, type, returnValue, _this, args) {
if (typeof tempReturn !== 'undefined') returnValue = tempReturn;
} catch (err) {
error({ labels: _labels.concat('runPatch'), message: [ `Failed to run ${type} callback for ${patch.caller?.id}:\n`, err ] });
error({ labels: _labels.concat('runPatch'), message: [ `Failed to run ${type} callback for ${patch.caller?.id}:\n`, err, '\nArgs:', args, '\nReturn:', returnValue ] });
patch.errorsOccurred++;
}
}

Loading…
Cancel
Save