is there a way to get the same behaviour of toString() in JS (the same way it is implemented in JVM), for instance, I have an exception where I add a data class to the message of the exception. In JS I only get
[object Object]
which is not really helpful