HF RL Explorer

Task: Preserve the original exception when a fallback also fails

Task: Preserve the original exception when a fallback also fails: a task in Terminal-Lego-15k (Harbor dataset). You are given a Python script that demonstrates nested try / except handling with a fallback operation. The first operation raises an exception, the fallback operation also fails, and…

The task

You are given a Python script that demonstrates nested `try`/`except` handling with a fallback operation. The first operation raises an exception, the fallback operation also fails, and the current code incorrectly re-raises the fallback exception instead of preserving the original one.

Part of PrimeIntellect/Terminal-Lego-15k.