MCPcopy Create free account
hub / github.com/deta/surf / showErrorMessage

Method showErrorMessage

app/src/main/crashHandler.ts:32–48  ·  view source on GitHub ↗
(
    browserWindow: BrowserWindow,
    message: string,
    detail?: string,
    buttons: string[] = ['OK'],
    type: 'error' | 'warning' = 'error'
  )

Source from the content-addressed store, hash-verified

30 }
31
32 private async showErrorMessage(
33 browserWindow: BrowserWindow,
34 message: string,
35 detail?: string,
36 buttons: string[] = ['OK'],
37 type: 'error' | 'warning' = 'error'
38 ): Promise<{ response: number }> {
39 return dialog.showMessageBox(browserWindow, {
40 title: type === 'error' ? 'Error' : 'Warning',
41 type,
42 message,
43 detail,
44 buttons,
45 defaultId: 0,
46 cancelId: buttons.length - 1
47 })
48 }
49
50 private logRendererError(
51 msg: string,

Callers 3

handleWebviewCrashMethod · 0.95
initializeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected