Refactors Logger.error to take the Error object

This commit is contained in:
Eric Amodio
2017-03-27 02:15:38 -04:00
parent c500293032
commit e0b3dcd484
31 changed files with 41 additions and 41 deletions

View File

@@ -29,7 +29,7 @@ async function gitCommand(cwd: string, ...args: any[]) {
Logger.warn('git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
}
else {
Logger.error('git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
Logger.error(ex, 'git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
}
throw ex;
}

View File

@@ -25,7 +25,7 @@ export class RemoteProviderFactory {
return creator(domain, path);
}
catch (ex) {
Logger.error(ex);
Logger.error(ex, 'RemoteProviderFactory');
return undefined;
}
}