This is a rebased, split up version of #15074. I’m going to leave this open for a week to see if it attracts any Concept ACKs, otherwise I’ll close it.
Changes from the original PR are removing an errant newline in this catch block, and splitting the assert opcodes are in a valid range
change from the error reporting changes.
These changes had been looked at by meshcolider and ajtowns, so have re-notified them.