mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
sql, stream - more clear error message when accessing wrapped_data
This commit is contained in:
@@ -287,8 +287,9 @@ try:
|
||||
# Override to avoid clean up unrelated to stream file.
|
||||
pass
|
||||
|
||||
def wrapped_data(self) -> NoReturn:
|
||||
class_name = str(type(self))
|
||||
@property
|
||||
def wrapped_data(self) -> NoReturn: # pyright: ignore[reportIncompatibleVariableOverride]
|
||||
class_name = type(self).__name__
|
||||
raise Exception(
|
||||
f"No `wrapped_data` for {class_name}. `ifcopenshell.{class_name}` is probably confused with `ifcopenshell.file`."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user