| Index: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineExceptionProcessor.java
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineExceptionProcessor.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineExceptionProcessor.java
|
| index 24dff7a5d649d3aaf0dbdb4622e9ade7b9eac22a..2c1286de0455ba6a1bb3baa3a55cd17b0b31bec6 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineExceptionProcessor.java
|
| +++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineExceptionProcessor.java
|
| @@ -40,6 +40,7 @@ import com.google.dart.java2dart.util.JavaUtils;
|
| import static com.google.dart.java2dart.util.AstFactory.identifier;
|
| import static com.google.dart.java2dart.util.AstFactory.instanceCreationExpression;
|
| import static com.google.dart.java2dart.util.AstFactory.nullLiteral;
|
| +import static com.google.dart.java2dart.util.AstFactory.string;
|
| import static com.google.dart.java2dart.util.AstFactory.typeName;
|
|
|
| import org.eclipse.jdt.core.dom.ITypeBinding;
|
| @@ -128,6 +129,22 @@ public class EngineExceptionProcessor extends SemanticProcessor {
|
| }
|
|
|
| @Override
|
| + public Void visitThrowExpression(ThrowExpression node) {
|
| + super.visitThrowExpression(node);
|
| + // "throw thrownException;" in AnalysisContextImpl -> "throw new AnalysisContext(thrownException)"
|
| + Expression expression = node.getExpression();
|
| + if (expression instanceof SimpleIdentifier
|
| + && ((SimpleIdentifier) expression).getName().equals("thrownException")) {
|
| + node.setExpression(instanceCreationExpression(
|
| + Keyword.NEW,
|
| + typeName("AnalysisException"),
|
| + string("<rethrow>"),
|
| + expression));
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + @Override
|
| public Void visitTypeName(TypeName node) {
|
| // AnalysisException -> CaughtException
|
| AstNode parent = node.getParent();
|
|
|