Skip to content

Commit

Permalink
Convert Datum to throw a BinaryParsingError for more visibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
npjg committed Jun 5, 2024
1 parent eccf44b commit 398a8d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MediaStation/Primitives/Datum.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from enum import IntEnum

import self_documenting_struct as struct
from asset_extraction_framework.Exceptions import BinaryParsingError

from .BoundingBox import BoundingBox
from .Polygon import Polygon
Expand Down Expand Up @@ -93,4 +94,4 @@ def __init__(self, stream):
self.d = Reference(stream)

else:
raise ValueError(f'Unknown datum type: 0x{self.t:04x}')
raise BinaryParsingError(f'Unknown datum type: 0x{self.t:04x}', stream)

0 comments on commit 398a8d4

Please sign in to comment.