@@ -26,7 +26,7 @@ import {
26
26
} from 'vscode-languageserver/node'
27
27
import { TextDocument } from 'vscode-languageserver-textdocument'
28
28
import { URI } from 'vscode-uri'
29
- import { showError , SilentError } from './util/error'
29
+ import { formatError , showError , SilentError } from './util/error'
30
30
import glob from 'fast-glob'
31
31
import normalizePath from 'normalize-path'
32
32
import * as path from 'path'
@@ -94,12 +94,12 @@ declare var __non_webpack_require__: typeof require
94
94
const connection =
95
95
process . argv . length <= 2 ? createConnection ( process . stdin , process . stdout ) : createConnection ( )
96
96
97
- // console.log = connection.console.log.bind(connection.console)
98
- // console.error = connection.console.error.bind(connection.console)
97
+ console . log = connection . console . log . bind ( connection . console )
98
+ console . error = connection . console . error . bind ( connection . console )
99
99
100
- // process.on('unhandledRejection', (e: any) => {
101
- // connection.console.error(formatError(`Unhandled exception`, e))
102
- // })
100
+ process . on ( 'unhandledRejection' , ( e : any ) => {
101
+ connection . console . error ( formatError ( `Unhandled exception` , e ) )
102
+ } )
103
103
104
104
function normalizeFileNameToFsPath ( fileName : string ) {
105
105
return URI . file ( fileName ) . fsPath
0 commit comments