Skip to content

Commit

Permalink
bugfix: Catch exception from the compiler for broken shadowed pickles (
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik authored Sep 6, 2023
2 parents 6dc3737 + fa54869 commit 5eb73b6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class CompilerSearchVisitor(
private def isAccessible(sym: Symbol): Boolean = try
sym != NoSymbol && sym.isPublic && sym.isStatic
catch
case err: AssertionError =>
logger.log(Level.WARNING, err.getMessage())
false
case NonFatal(e) =>
reports.incognito.create(
Report(
Expand Down Expand Up @@ -64,8 +67,14 @@ class CompilerSearchVisitor(
.stripSuffix("$")
.split("\\$")

val added = toSymbols(pkg, innerPath.toList).filter(visitSymbol)
val added =
try toSymbols(pkg, innerPath.toList).filter(visitSymbol)
catch
case NonFatal(e) =>
logger.log(Level.WARNING, e.getMessage(), e)
Nil
added.size
end visitClassfile

def visitWorkspaceSymbol(
path: java.nio.file.Path,
Expand Down

0 comments on commit 5eb73b6

Please sign in to comment.