murblanc commented on a change in pull request #1624:
URL: https://github.com/apache/lucene-solr/pull/1624#discussion_r446626784



##########
File path: solr/core/src/java/org/apache/solr/api/AnnotatedApi.java
##########
@@ -306,7 +313,7 @@ void invoke(SolrQueryRequest req, SolrQueryResponse rsp, 
CommandOperation cmd) {
       } catch (InvocationTargetException ite) {
         log.error("Error executing command ", ite);
         throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
ite.getCause());
-      } catch (Exception e) {
+      } catch (Throwable e) {

Review comment:
       I think a comment referencing the `MethodHandle` Javadoc would be 
helpful here, as the Javadoc explains `Throwable` should be caught and the 
exception wrapped.
   
   > But in Java source code, methods which perform method handle calls must 
either explicitly throw Throwable, or else must catch all throwables locally, 
rethrowing only those which are legal in the context, and wrapping ones which 
are illegal.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to