https://www.7ix.net/archives/318.html
How to capture and analyze JavaScript Error