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


##########
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:
   Well the `url` should not change other than the parts that are intertwined 
with the version being used. So this shouldn't necessarily be an issue from 
that standpoint right? I may be am I missing the point that you are referring 
to as well. Is this possibly more of something for `downloadAndExtract` should 
handle or do you have any input on what you would think would be best to do in 
addition to checking for `404 Not Found`? The main purpose we want to check is 
that a valid Daffodil version is being given. Such as say `3.10.0`, `3.11.0` 
and `4.0.0` are valid but version `5.6.7` is not.



-- 
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