Skip to content

Commit

Permalink
fix #338 (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus authored Dec 16, 2024
1 parent 9e41595 commit e6d6509
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/gumtree/spoon/diff/operations/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ public DefaultJavaPrettyPrinter scan(CtElement e) {
}
};

print.scan(element);
return print.getResult();
try {
// we run best-effort in a try-catch
print.scan(element);
} finally {
return print.getResult();
}
}

/** returns the changed (inserded/deleted/updated) element */
Expand Down

0 comments on commit e6d6509

Please sign in to comment.