log plugins' errors in Electron console (#923)

Default `err.message` notification is not helpful,
because it lacks stack and context.

it doesnt hurt for end users to add `console.error(err)`,
because they arent gonna see it. Though, as far as `console.error`
is being logged in Electron console, developers will get
enough information to identify problems with plugin they are developing.
This commit is contained in:
Vladimir Starkov 2016-10-23 13:42:58 +02:00 committed by Matheus Fernandes
parent 97432df7a4
commit 698cdb0e31

View file

@ -295,6 +295,7 @@ function requirePlugins() {
return mod;
} catch (err) {
console.error(err);
notify('Plugin error!', `Plugin "${basename(path)}" failed to load (${err.message})`);
}
};