Skip to content

Commit

Permalink
[python] handle exceptions if they are raised by children in variable…
Browse files Browse the repository at this point in the history
…s pane (#2752)

* don't time out if error

* log error but have generic output
  • Loading branch information
isabelizimm authored Apr 12, 2024
1 parent b60a5f6 commit d6e75aa
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ def get_length(self) -> int:
return len([p for p in dir(self.value) if not (p.startswith("_"))])

def get_child(self, key: str) -> Any:
return getattr(self.value, key)
if isinstance(self.value, property):
pass
try:
return getattr(self.value, key)
except Exception as e:
logger.warning(msg=f"{type(e).__name__}: {e}")
return "Unable to show value."

def get_items(self) -> Iterable[Tuple[str, Any]]:
for key in dir(self.value):
Expand Down

0 comments on commit d6e75aa

Please sign in to comment.