Add --continue-after-exceptions flag; exit on first exception by default #133
Labels
No Label
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: john/McRogueFace#133
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
When a Python callback raises an exception (timer, keypress, click, animation), McRogueFace currently:
PyErr_Print()This behavior is problematic for AI-driven development and automated testing because:
Current Exception Handling Locations
Timer.cppPyCallable.cppPyCallable.cppAnimation.cppAll use the pattern:
Proposed Solution
New Default Behavior
On the first unhandled exception in any callback:
New Flag:
--continue-after-exceptionsPreserves current behavior for developers who want to:
Implementation Changes
1. Add to
McRogueFaceConfig.h:2. Add to
CommandLineParser.cpp:3. Update help text in
print_help():4. Create exception signaling mechanism
Option A: Global atomic flag (simplest)
Option B: Singleton accessor
5. Modify exception handlers (example for Timer.cpp):
6. Check flag in game loop (
GameEngine.cpp):Exit Code Behavior
sys.exit(0)sys.exit(1)--continue-after-exceptionsTesting Considerations
sys.exit(0)for PASS should continue workingAlternatives Considered
Related
test_python_object_cache.pyfailure