Use throwException() instead of manually created instance

This commit is contained in:
Andrey Breslav
2013-10-14 07:47:51 +04:00
parent 9814726f9d
commit e13c331e78
+1 -4
View File
@@ -176,10 +176,7 @@ class SingleInstructionInterpreter(private val eval: Eval) : Interpreter<Value>(
ObjectValue(value.obj, targetType)
}
else {
throw ThrownFromEvalException(ObjectValue(
ClassCastException("Value '$value' cannot be cast to $targetType"),
Type.getType(javaClass<ClassCastException>())
))
throwException(ClassCastException("Value '$value' cannot be cast to $targetType"))
}
}