Skip to content

Python library should throw specific exceptions #280

@rossburton

Description

@rossburton

If I'm parsing an arbitrary file I want to be able to tell "file not found" from "content can't be parsed" from "internal parser error", but this isn't possible if the kaitaistruct read functions (such as ensure_fixed_contents()) just throw Exception().

The module should have a kaitaistruct.ParseException(Exception) class specifically for parse problems.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions