Retrieving Script Error Message in Sonic SE

I have a script that inserts an object in a different slot, which works fine in Halion + Sonic, but gives an error in Sonic SE.

Is there a way of retrieving the error message in Sonic SE?

Seeing as the script works fine in Halion + Sonic, I’m kind of stuck as to what is going wrong.
I tried a pcall function which outputs the error to a text parameter. A few pcall tests worked in Halion, but it doesn’t seem to work in SE.

Any help would be appreciated.