mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-508 - Change error and warn functions to prevent from exposing application path (#388)
This commit is contained in:
parent
7ae769df7e
commit
a54266a0ae
@ -186,7 +186,7 @@
|
||||
}
|
||||
|
||||
function snippetError(err) {
|
||||
alert('error getting snippet' + err);
|
||||
alert('error getting snippet' + err.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -166,24 +166,26 @@ function readResult(outputFileName, resolve, reject, childProcessErr) {
|
||||
/* eslint-disable class-methods-use-this */
|
||||
/**
|
||||
* Create an error object with the ERROR level
|
||||
* @param msg
|
||||
* @returns {Error}
|
||||
* @param message
|
||||
* @returns {{message: string, type: string}}
|
||||
*/
|
||||
function createError(msg) {
|
||||
let err = new Error(msg);
|
||||
err.type = 'ERROR';
|
||||
return err;
|
||||
function createError(message) {
|
||||
return {
|
||||
message,
|
||||
type: 'ERROR',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an error object with the WARN level
|
||||
* @param msg
|
||||
* @returns {Error}
|
||||
* @param message
|
||||
* @returns {{message: string, type: string}}
|
||||
*/
|
||||
function createWarn(msg) {
|
||||
let err = new Error(msg);
|
||||
err.type = 'WARN';
|
||||
return err;
|
||||
function createWarn(message) {
|
||||
return {
|
||||
message,
|
||||
type: 'WARN',
|
||||
};
|
||||
}
|
||||
/* eslint-enable class-methods-use-this */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user