@@ -143,9 +143,9 @@ Workspace Root: ${workspaceRootPath}`;
143143 }
144144 catch ( e ) {
145145 const errorMessage = `${ extensionName } extension failed to execute command '${ commandName } '. See debug console for details.` ;
146- if ( e . name && e . message ) {
147- errorMessage += `\n\n( ${ extensionName } ) ${ e . name } : ${ e . message } `
148- } ;
146+ if ( e ) {
147+ errorMessage += `\n\nErr : ${ e } ` ;
148+ }
149149 console . log ( errorMessage ) ;
150150 vscode . window . showErrorMessage ( errorMessage ) ;
151151 return ;
@@ -182,11 +182,11 @@ function executeCommand1(commandName, fileUri, pullLines, simpleFormat) {
182182 filePath = editor . document . fileName ;
183183 }
184184
185- if ( ! fs . existsSync ( filePath ) ) {
186- // we generate a warning but still generate the url
187- const errorMessage = `The file '${ filePath } ' does not exist locally, so no url was generated.` ;
188- allWarnings . push ( errorMessage ) ;
189- }
185+ if ( ! fs . existsSync ( filePath ) ) {
186+ // we generate a warning but still generate the url
187+ const errorMessage = `The file '${ filePath } ' does not exist locally, so no url was generated.` ;
188+ allWarnings . push ( errorMessage ) ;
189+ }
190190
191191 const result = generateGithubUrl ( commandName , workspaceRootPath , filePath , lineInfo ) ;
192192 if ( result ) {
@@ -195,7 +195,7 @@ function executeCommand1(commandName, fileUri, pullLines, simpleFormat) {
195195 {
196196 const url = result . url ;
197197 const relativeFilePath = result . relativePathFromGitRoot ;
198- const urlMarkdownLink = simpleFormat ? url :`[${ relativeFilePath } ](${ url } )` ;
198+ const urlMarkdownLink = simpleFormat ? url : `[${ relativeFilePath } ](${ url } )` ;
199199 copyPaste . copy ( urlMarkdownLink ) ;
200200 }
201201 return ;
@@ -223,9 +223,9 @@ Workspace Root: ${workspaceRootPath}`;
223223 }
224224 catch ( e ) {
225225 const errorMessage = `${ extensionName } extension failed to execute command '${ commandName } '. See debug console for details.` ;
226- if ( e . name && e . message ) {
227- errorMessage += `\n\n( ${ extensionName } ) ${ e . name } : ${ e . message } `
228- } ;
226+ if ( e ) {
227+ errorMessage += `\n\nErr : ${ e } ` ;
228+ }
229229 console . log ( errorMessage ) ;
230230 vscode . window . showErrorMessage ( errorMessage ) ;
231231 return ;
@@ -307,9 +307,9 @@ Filepath: ${filePath}`;
307307 }
308308 catch ( e ) {
309309 let errorMessage = `${ extensionName } extension failed to run 'generateGithubUrl' due to an unhandled error. See debug console for details.` ;
310- if ( e . name && e . message ) {
311- errorMessage += `\n\n( ${ extensionName } ) ${ e . name } : ${ e . message } `
312- } ;
310+ if ( e ) {
311+ errorMessage += `\n\nErr : ${ e } ` ;
312+ }
313313 return {
314314 type : 'error' ,
315315 errorMessage,
@@ -352,7 +352,7 @@ function findAndParseConfig(rootPath) {
352352 const modName = match1 [ 1 ] ;
353353 const modFullpath = path . join ( currentPath , modName ) . replace ( / \\ / g, '/' ) ;
354354 if ( ! subUrl ) {
355- console . warn ( `subModule '${ name } ' at '${ modFullpath } ' is missing a url, it will be skipped` ) ;
355+ console . warn ( `subModule '${ modName } ' at '${ modFullpath } ' is missing a url, it will be skipped` ) ;
356356 } else {
357357 const metaInfo = {
358358 path : modFullpath ,
0 commit comments