vinicioslc/adb-interface-vscode

View on GitHub
src/controllers/adb-controller/ADBBaseController.ts

Summary

Maintainability
A
1 hr
Test Coverage
import * as vscode from 'vscode'
import { ExtController } from '../../infra/extension/ExtensionController'
import { ADBInterfaceException } from '../../domain/adb-wrapper'

export class ADBBaseController extends ExtController {
  async genericErrorReturn(e: Error) {
    if (e instanceof ADBInterfaceException) {
      vscode.window.showWarningMessage(e.message)
    } else {
      vscode.window.showErrorMessage('Error:' + e.message)
    }
  }
}