Simple answer is no, there is no way to do this.

It's worthy of a post in the "suggestions" forum though. A Macro like @SCRIPTLINE which returns the line count would be a useful addition for debugging / error messages.