aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java b/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
index 074f79fb48..c12aaddff5 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
@@ -61,7 +61,6 @@ public class UserDefinedFunction extends BaseFunction {
Profiler.instance().startTask(ProfilerTask.SKYLARK_USER_FN,
getLocationPathAndLine() + "#" + getName());
- Statement lastStatement = null;
try {
env.enterScope(this, ast, definitionGlobals);
ImmutableList<String> names = signature.getSignature().getNames();
@@ -74,22 +73,12 @@ public class UserDefinedFunction extends BaseFunction {
try {
for (Statement stmt : statements) {
- lastStatement = stmt;
stmt.exec(env);
}
} catch (ReturnStatement.ReturnException e) {
return e.getValue();
}
return Runtime.NONE;
- } catch (EvalExceptionWithStackTrace ex) {
- // We need this block since the next "catch" must only catch EvalExceptions that don't have a
- // stack trace yet.
- throw ex;
- } catch (EvalException ex) {
- EvalExceptionWithStackTrace real =
- new EvalExceptionWithStackTrace(ex, lastStatement.getLocation());
- real.registerStatement(lastStatement);
- throw real;
} finally {
Profiler.instance().completeTask(ProfilerTask.SKYLARK_USER_FN);
env.exitScope();