This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Description
Describe the bug
Python host code doesn't receive runtime exceptions thrown by Q# code it calls.
To Reproduce
Steps to reproduce the behavior:
Q# code:
namespace Quantum.CircuitPuzzle {
operation ThrowEx() : Int {
fail "Throwing exception";
}
}
Python host code:
import qsharp
from Quantum.CircuitPuzzle import ThrowEx
try:
ThrowEx.simulate()
print("Didn't catch exception")
except Exception:
print("Caught exception")
Expected behavior
Python catching exception and printing "Caught exception".
System information
- OS: Windows 11
dotnet iqsharp --version = 0.19.2109165653