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

@@ -49,7 +49,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());
}
catch (ex) {
Logger.error('[GitLens.DiffWithPreviousCommand]', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`, ex);
Logger.error(ex, 'DiffWithPreviousCommand', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
}
}
@@ -68,7 +68,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
return await commands.executeCommand(BuiltInCommands.RevealLine, { lineNumber: line, at: 'center' });
}
catch (ex) {
Logger.error('[GitLens.DiffWithPreviousCommand]', 'getVersionedFile', ex);
Logger.error(ex, 'DiffWithPreviousCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
}
}