Skip to content

Don't throw an exception in StructureNode::isDefined() when checking an extension field, even if extension is unregistered - #333

Merged
asmaloney merged 1 commit into
masterfrom
isDefined-exception-handling
Dec 15, 2025
Merged

Don't throw an exception in StructureNode::isDefined() when checking an extension field, even if extension is unregistered#333
asmaloney merged 1 commit into
masterfrom
isDefined-exception-handling

Conversation

@asmaloney

Copy link
Copy Markdown
Owner

Before this change:

• isDefined( "foo" ) returns true OR false
• isDefined( "nor:normalX" ) returns true OR false (if the extension is registered) OR causes an exception (if the extension is unregistered)

This is counterintuitive, so get rid of the exception case and just return false even if the extension is unregistered.

Fixes #330

…an extension field, even if extension is unregistered

Before this change:

• isDefined( "foo" ) returns true OR false
• isDefined( "nor:normalX" ) returns true OR false (if the extension is registered) OR causes an exception (if the extension is unregistered)

This is counterintuitive, so get rid of the exception case and just return false even if the extension is unregistered.

Fixes #330
@asmaloney
asmaloney merged commit 159a5ef into master Dec 15, 2025
23 checks passed
@asmaloney
asmaloney deleted the isDefined-exception-handling branch December 15, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent behaviour with isDefined() giving ErrorBadPathName

1 participant