metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ottobackwards <...@git.apache.org>
Subject [GitHub] metron pull request #779: METRON-1218: Metron REST should return better erro...
Date Sat, 30 Sep 2017 13:22:45 GMT
Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/779#discussion_r142006134
  
    --- Diff: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/RestExceptionHandler.java
---
    @@ -45,4 +45,14 @@ private HttpStatus getStatus(HttpServletRequest request) {
         }
         return HttpStatus.valueOf(statusCode);
       }
    +
    +  private String getFullMessage(Throwable ex) {
    +    String fullMessage = ex.getMessage();
    +    Throwable cause = ex.getCause();
    --- End diff --
    
    This is a possible recursion point, where  ex.getCause() == ex .
    Can we use the commons ExceptionUtils.getRootCause()?  If not we need to guard against
this.


---

Mime
View raw message