Skip to content

Commit

Permalink
Minor changes in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
OpSimple authored Aug 7, 2019
1 parent 718d1c3 commit 244f97a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ app.on('ready', () => {
window.loadURL(url+'#'+r);
}
}).catch((err) => {
logger.error('Error while calling prompt: '+ err.name + ' - ' +err.message);
logger.error('Error while calling prompt: '+ err.toString());
console.log(err);
});
} else {
Expand All @@ -170,7 +170,7 @@ app.on('ready', () => {
const files = fs.readdirSync(modsdir, 'utf8', (err, data) => {
if(err) {
console.log(err);
logger.error('Error while trying to read the contents of modules dir :' + err.name + ' - ' +err.message);
logger.error('Error while trying to read the contents of modules dir :' + err.toString());
}
});
if(files!=null) {
Expand All @@ -185,7 +185,7 @@ app.on('ready', () => {
const files = fs.readdirSync(dir, 'utf8', (err, files) => {
if(err) {
console.log(err);
logger.error('Error while trying to read the contents of modules dir :' + err.name + ' - ' +err.message);
logger.error('Error while trying to read the contents of modules dir :'+ dir + ' ' + err.toString());
}
});
if(files!=null) {
Expand Down Expand Up @@ -223,7 +223,7 @@ function loadHome() {
window.loadURL(CONFIG.page+'?'+r);
}
}).catch( (err) => {
logger.error('Error while calling prompt: '+err.name + ' - ' +err.message);
logger.error('Error while calling prompt: '+err.toString());
console.log(err);
});
}
Expand All @@ -236,7 +236,7 @@ function injectMod(file) {
if(file.endsWith('.js')) {
const js = fs.readFileSync(file, 'utf8', (err,data) => {
if(err) {
logger.error('Error while trying to read file :' + file + ' ' + err.name + ' - ' +err.message);
logger.error('Error while trying to read file :' + file + ' ' + err.toString());
console.log(err);
return;
}
Expand All @@ -254,7 +254,7 @@ function injectMod(file) {
function readConfig(){
const data = fs.readFileSync( config, 'utf8', (err,data) => {
if(err) {
logger.fatal('Error while trying to read config file!\n'+err.name + ' - ' +err.message);
logger.fatal('Error while trying to read config file!\n'+err.toString());
console.log(err);
return;
}
Expand All @@ -264,7 +264,7 @@ function readConfig(){
CONFIG = JSON.parse(data);
CONFIG.version = ver;
} catch (err) {
logger.fatal('Error while trying to read config file!\n'+err.name + ' - ' +err.message);
logger.fatal('Error while trying to read config file!\n'+err.toString());
console.log(err);
return;
}
Expand Down

0 comments on commit 244f97a

Please sign in to comment.