scala/scala — pull request #2389 by retronym (2013-04-13 07:43:53+00:00)
Title: SI-7360 Don't let a follow-up TypeError obscure the original error.

When supplementing a fatal error message with context (current
compilation unit, tree, phase, etcetera), we must be cautious to
not to trigger another error which will obscure the original one.

Currently, `supplementErrorMessage` does its working a try catch
that only catches `Exception`. But this fails to catch
CyclicReferenceError (<: TypeError <: Throwable), as was seen
in a recent mailing list post by Greg Meredith.

This commit extends the catch clause.

Review by @paulp