Skip to content

SyntaxValidator.validate throws exception on invalid XML instead of returning error #9

@sherlock1982

Description

@sherlock1982

Since the function returns true or error I would expect it to not throw exceptions. Also like this it's not a drop-in replacement of original validator looks like

function validateXml(value: string): boolean {
    try {
        value = 'Not really an xml';
        return SyntaxValidator.validate(value) === true;
    }
    catch {
        return false;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions