Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ansys/fluent/core/solver/flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@


class InactiveObjectError(RuntimeError):
"""Provides the error when the object is inactive."""
"""Inactive object access."""

def __init__(self):
super().__init__("Object is not active.")
def __init__(self, python_path):
super().__init__(f"'{python_path}' is currently inactive.")


class _InlineConstants:
Expand Down Expand Up @@ -216,7 +216,7 @@ def get_attr(
if attrs:
attrs = attrs.get("attrs", attrs)
if attr != "active?" and attrs and attrs.get("active?", True) is False:
raise InactiveObjectError()
raise InactiveObjectError(self.python_path)
val = None
if attrs:
val = attrs[attr]
Expand Down Expand Up @@ -581,7 +581,7 @@ def _get_parent_of_active_child_names(self, name):
def __getattribute__(self, name):
if name in super().__getattribute__("child_names"):
if self.is_active() is False:
raise RuntimeError(f"'{self.python_path}' is currently not active")
raise InactiveObjectError(self.python_path)
try:
return super().__getattribute__(name)
except AttributeError as ex:
Expand Down