From 6d1dbfad1e0d242498eea3ea3f7d0545458dbd51 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Thu, 15 Mar 2018 13:20:13 -0300 Subject: [PATCH] add logging for patches --- client/src/modules/patcher.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/modules/patcher.js b/client/src/modules/patcher.js index 50206919..d9a80f2e 100644 --- a/client/src/modules/patcher.js +++ b/client/src/modules/patcher.js @@ -9,6 +9,7 @@ */ import WebpackModules from './webpackmodules'; +import { ClientLogger as Logger } from 'common'; export default class Patcher { static get patches() { return this._patches || (this._patches = {}) } @@ -23,13 +24,17 @@ export default class Patcher { for (const s of patch.supers) { try { s.fn.apply(this, arguments); - } catch (err) { } + } catch (err) { + Logger.err('Patcher', err); + } } const retVal = patch.ofn.apply(this, arguments); for (const s of patch.slaves) { try { - s.fn.apply(this, [arguments, { patch, retVal }]); - } catch (err) { } + s.fn.apply(this, [arguments, { patch, retVal }]); + } catch (err) { + Logger.err('Patcher', err); + } } return retVal; }