KJS: implement Throwable in Kotlin instead of use it as alias of JS Error

* Make it an inheritor of JS Error. Otherwise, Chakra engine doesn't fill stack trace of exception; In other engines inheritance has some good effects too.
* Copy all properties from internally created instance of JS Error

 #KT-6985 Fixed
 #KT-2328 Fixed
 #KT-8019 Fixed
 #KT-10911 Fixed
This commit is contained in:
Zalim Bashorov
2016-11-14 22:36:49 +03:00
parent 1f4d95eaa7
commit aa2a4f0794
10 changed files with 114 additions and 40 deletions
@@ -1,6 +1,3 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
class MyThrowable(message: String? = null, cause: Throwable? = null) : Throwable(message, cause) {
override val message: String?