Skip to content

Commit 3a0deb4

Browse files
committed
fix: re-raise MemoryError and RecursionError in settings fallback
Bare 'except Exception' swallows MemoryError and RecursionError which inherit from Exception. Re-raise them per project convention (PEP 758 syntax).
1 parent 39ab243 commit 3a0deb4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/synthorg/engine/agent_engine.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,8 @@ async def _prepare_context( # noqa: PLR0913
879879
)
880880
if raw_override > 0:
881881
tokens_override = raw_override
882+
except MemoryError, RecursionError:
883+
raise
882884
except Exception:
883885
logger.warning(
884886
EXECUTION_ENGINE_ERROR,

0 commit comments

Comments
 (0)