MCPcopy Index your code
hub / github.com/marktext/marktext / exceptionToString

Function exceptionToString

packages/desktop/src/main/exceptionHandler.ts:29–39  ·  view source on GitHub ↗
(error: Error, type: ErrorType)

Source from the content-addressed store, hash-verified

27}
28
29const exceptionToString = (error: Error, type: ErrorType): string => {
30 const { message, stack } = error
31 return (
32 `Version: ${MARKTEXT_VERSION_STRING || app.getVersion()}\n` +
33 `OS: ${getOSInformation()}\n` +
34 `Type: ${type}\n` +
35 `Date: ${new Date().toUTCString()}\n` +
36 `Message: ${message}\n` +
37 `Stack: ${stack}\n`
38 )
39}
40
41const handleError = async(title: string, error: Error, type: ErrorType): Promise<void> => {
42 const { message, stack } = error

Callers 1

handleErrorFunction · 0.85

Calls 1

getOSInformationFunction · 0.85

Tested by

no test coverage detected