I implemented:
window.onerror = function (m, s, l, c, e) {
}
Where the e is the Error Object. For example, it contains:
ReferenceError: rde is not defined
at Object.bla.cs (domain.pt/bla.js:418:17)
at n.aanv (domain.pt/bla.js:125:29)
If i make e.toString()
, only the first line is returned. How to get the 3 lines? Thank you.
Error object have a .message
property containing the full message (no need for .toString()
. There is also .stack
but it's not a standardized property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With