import { notificationService } from '@salesforce/salesforcedx-utils-vscode/out/src/commands' ; import { env , Uri } from 'vscode' ; import { channelService } from '../channel' ; import { nls } from '../messages' ; import { telemetryService } from '../telemetry' ; export function showError ( e , logName , commandName ) { telemetryService . sendException ( `${ logName }_error` , e . message ) ; notificationService . showErrorMessage ( e . message ) ; notificationService . showErrorMessage ( nls . localize ( 'command_failure' , commandName ) ) ; channelService . appendLine ( `Error: ${ e . message }` ) ; channelService . showChannelOutput ( ) ; } export function openBrowser ( url ) { return env . openExternal ( Uri . parse ( url ) ) ; }