Skip to content

Validation difference 3.4.5 -> 4.0.1 #448

@number492

Description

@number492

I've encountered different exceptions since 4.0.0, and #446 didn't fix them. When I craft purposefully wrong inputs, I get less descriptive errors now:

Input: XMLSchema('aaaaaaaaaaaaaaaaaaaaa')
Before: XMLSchemaValueError: Invalid XSD schema file: Empty URI provided!
After: XMLResourceOSError: can't access to resource 'file:///path/aaaaaaaaaaaaaaaaaaaaa': [Errno 2] No such file or directory: '/path/aaaaaaaaaaaaaaaaaaaaa'

Input: XMLSchema('<<<<<<<')
Before: ParseError: Invalid XSD schema file: not well-formed (invalid token): line 1, column 1
After: XMLSchemaChildrenValidationError: Unexpected child with tag '{http://schemas.xmlsoap.org/wsdl/}types_wrong' at position 1.

I know that none of the error messages are perfect, but I think the old ones were more accurate, and the XMLSchemaChildrenValidationError looks like an f-string that missed the formatting. Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions