As far as I have seen you can use on-error for two things.
- Prevent script from stop running if there are one or more error.
- Run an alternate code if some error occurs.
I have not seen any possibility to get the actual error listed.
That would be nice to have, so if MT reads this, please add.