michael-hoke commented on code in PR #1372:
URL: https://github.com/apache/daffodil-vscode/pull/1372#discussion_r2298422357
##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -341,22 +341,32 @@ export function activateDaffodilDebug(
'extension.dfdl-debug.getSchemaName',
async (fileRequested = null) => {
// Open native file explorer to allow user to select data file from
anywhere on their machine
- return await getFile(
+ const retVal = await getFile(
fileRequested,
'Select DFDL schema to debug',
'Select DFDL schema to debug'
)
+
+ if (!retVal)
+ vscode.window.showErrorMessage('Invalid DFDL schema Path selected')
Review Comment:
Use showInformationMessage instead of showErrorMessage - this matches the
behavior in the same error path for TDML.
##########
src/daffodilDebugger/debugger.ts:
##########
@@ -145,16 +145,32 @@ export async function getDebugger(
// Get schema file before debugger starts to avoid timeout
if (config.schema.path.includes('${command:AskForSchemaName}')) {
- config.schema.path = await vscode.commands.executeCommand(
+ const schemaPath = await vscode.commands.executeCommand(
'extension.dfdl-debug.getSchemaName'
)
+
+ // Stop execution if schemaPath is null, undefined, or empty string
+ if (!schemaPath) {
+ vscode.window.showErrorMessage('Schema path not provided.')
Review Comment:
I think this should be removed - right now, if I press Esc on an input, I
get two error messages, but I should only ever see one.
--
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]