shanedell commented on code in PR #1532:
URL: https://github.com/apache/daffodil-vscode/pull/1532#discussion_r2543455413


##########
src/daffodilDebugger/daffodilJars.ts:
##########
@@ -75,7 +76,21 @@ export async function downloadAndExtractToGlobalStorage(
     try {
       await downloadAndExtract('Daffodil CLI JARs', url, destFolder)
     } catch (err) {
+      /**
+       * If 404 not found error, this means the daffodilVersion provided was 
not valid.
+       * When an invalid version is given show the user a message, otherwise 
log the error.
+       * When an error is hit return 'error' string.
+       * The error string makes it so the extension won't try to return the 
debugger.
+       */
+      if (`${err}`.includes('404 Not Found')) {
+        vscode.window.showErrorMessage(
+          'Invalid Daffodil Version. Check value set for 
dfdlDebugger.daffodilVersion'
+        )
+      }
+
       console.error(err)
+
+      return 'error'

Review Comment:
   @stricklandrbls where do you this variable should live? I assume name it 
something like `const errorString = 'error` and then just do a `return 
errorString` after importing it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to