From a0349692cbe8bc6f3549db6c66ecf829c80d1288 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Fri, 16 Sep 2022 13:35:06 -0700 Subject: [PATCH] Document `RethrowReflectiveOperationExceptionAsLinkageError` PiperOrigin-RevId: 474890217 --- .../RethrowReflectiveOperationExceptionAsLinkageError.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/bugpattern/RethrowReflectiveOperationExceptionAsLinkageError.md diff --git a/docs/bugpattern/RethrowReflectiveOperationExceptionAsLinkageError.md b/docs/bugpattern/RethrowReflectiveOperationExceptionAsLinkageError.md new file mode 100644 index 00000000000..95e51d1db6e --- /dev/null +++ b/docs/bugpattern/RethrowReflectiveOperationExceptionAsLinkageError.md @@ -0,0 +1,3 @@ +Consider using `LinkageError` instead of `AssertionError` when rethrowing +reflective exceptions as unchecked exceptions, since it conveys more information +when reflection fails due to an incompatible change in the classpath.