Avoid throwing an exception when ScriptList doesn't match. (#84921)
This prevents 'catch throw' gdb breakpoint pollution and
should also improve performance.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84921
Approved by: https://github.com/Chillee