docs: public static List getExceptions(Throwable cause)
      {
          List exceptions = new ArrayList(10);
          exceptions.add(cause);
          
          do
          {
              Throwable nextCause;
              try
              {
                  Method rootCause = cause.getClass().getMethod("getRootCause", new Class[]{});
                  nextCause = (Throwable) rootCause.invoke(cause, new Object[]{});
              }
              catch(Exception e)
              {
                  nextCause = cause.getCause();
              }
              if (cause == nextCause)
              {
                  break;
              }
              
              if (nextCause != null)
              {
                  exceptions.add(nextCause);
              }
              
              cause = nextCause;
          }
          while (cause != null);
          
          return exceptions;
      }