Get rid of unnecessary exceptions in JS translator
Before this commit, an internal error during JS translation resulted in the actual exception wrapped in TranslationRuntimeException wrapped in TranslationInternalException wrapped in RuntimeException being thrown. This change gets rid of the two latter wrappings. Also delete unthrown MainFunctionNotFoundException and related unused constructors in TranslationException
This commit is contained in:
@@ -16,9 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.test.semantics;
|
||||
|
||||
import org.jetbrains.kotlin.js.facade.exceptions.TranslationInternalException;
|
||||
import org.jetbrains.kotlin.js.test.SingleFileTranslationTest;
|
||||
import org.junit.Assert;
|
||||
|
||||
public final class NumberTest extends SingleFileTranslationTest {
|
||||
public NumberTest() {
|
||||
@@ -56,14 +54,7 @@ public final class NumberTest extends SingleFileTranslationTest {
|
||||
}
|
||||
|
||||
public void testHexadecimalConstant() throws Exception {
|
||||
try {
|
||||
fooBoxTest();
|
||||
}
|
||||
catch (TranslationInternalException e) {
|
||||
Throwable cause = e.getCause();
|
||||
Assert.assertTrue(cause instanceof IllegalStateException);
|
||||
Assert.assertTrue(cause.getMessage().startsWith("Unsupported long constant "));
|
||||
}
|
||||
fooBoxTest();
|
||||
}
|
||||
|
||||
public void testNumberCompareTo() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user