Skip to content

Commit

Permalink
fix: Return to not using JuliaError type in case Julia isn't loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt-aws committed Aug 28, 2024
1 parent 92c313b commit e5bf216
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/braket/simulator_v2/julia_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@


def _handle_julia_error(error):
import sys

if isinstance(error, sys.modules["juliacall"].JuliaError):
# in case juliacall isn't loaded
if type(error).__name__ == "JuliaError":
python_exception = getattr(error.exception, "alternate_type", None)
if python_exception is None:
# convert to RuntimeError as JuliaError can't be serialized
Expand Down

0 comments on commit e5bf216

Please sign in to comment.