Bug report
Checklist
CPython versions tested on:
3.12
Operating systems tested on:
No response
Output from running 'python -VV' on the command line:
No response
A clear and concise description of the bug:
sys.monitoring.set_local_events(TOOL, code, sys.monitoring.events.RAISE) should raise an exception, but succeeds.
This was discovered when investigating #108390.
Fixed by #108420