Hello,
So I can not get the name of the action/rule/etc itself and also not this name?
Yes, that is correct. Unfortunately, there is no such possibility within the script itself.
And what is about the line number of the code, where the try/catch happens?
Unfortunately, there is no possibility to get it. However, in case of errors/warnings, usually, there is the line number included into the message.