I’d asked that before, and the response was that Skulpt didn’t expose that to Python yet. Since that time ExternalErrors have gotten a bit of extra info to access the Javascript exceptions: Anvil Docs | Accessing Javascript
There’s also a workaround for getting the current line number out of Skulpt: Skulpt limitations on SyntaxError? - #4 by divyeshlakhotia
All of that’s only with exceptions, though.