mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Fix transmitting errors through IPC
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
module.exports = function makeError(obj) {
|
||||
const err = new Error(obj.message, obj.fileName, obj.lineNumber);
|
||||
const err = new Error(obj.message);
|
||||
err.name = obj.name;
|
||||
err.columnNumber = obj.columnNumber;
|
||||
err.stack = obj.stack;
|
||||
return err;
|
||||
};
|
||||
|
||||
7
src/util/MakePlainError.js
Normal file
7
src/util/MakePlainError.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function makePlainError(err) {
|
||||
const obj = {};
|
||||
obj.name = err.name;
|
||||
obj.message = err.message;
|
||||
obj.stack = err.stack;
|
||||
return obj;
|
||||
};
|
||||
Reference in New Issue
Block a user