JS backend: made some exceptions more JS idiomatic -- translate Exception to Error, IndexOutOfBounds and IndexOutOfBoundsException to RangeError.

This commit is contained in:
develar
2013-08-08 19:51:49 +04:00
committed by Zalim Bashorov
parent f5feb5e729
commit 1435bdb7c7
2 changed files with 15 additions and 15 deletions
+7 -4
View File
@@ -3,8 +3,8 @@ package java.lang
import java.io.IOException
import js.library
library
open public class Exception(message: String? = null) : Throwable() {}
native("Error")
open public class Exception(message: String? = null): Throwable() {}
library
open public class RuntimeException(message: String? = null) : Exception(message) {}
@@ -15,8 +15,11 @@ public class IllegalArgumentException(message: String? = null) : Exception() {}
library
public class IllegalStateException(message: String? = null) : Exception() {}
library
public class IndexOutOfBoundsException(message: String? = null) : Exception() {}
native("RangeError")
public class IndexOutOfBounds(message: String? = null) : Exception(message) {}
native("RangeError")
public class IndexOutOfBoundsException(message: String? = null) : Exception(message) {}
library
public class UnsupportedOperationException(message: String? = null) : Exception() {}