docs: public boolean isAnAuthorizationException(SQLException x) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(this, tc, "isAnAuthorizationException", x);
  
          boolean isAuthError = false;
          LinkedList<SQLException> stack = new LinkedList<SQLException>();
          if (x != null) 
              stack.push(x);
  
          // Limit the chain depth so that poorly written exceptions don't cause an infinite loop.
          for (int depth = 0; depth < 20 && !isAuthError && !stack.isEmpty(); depth++) {
              x = stack.pop();
  
              isAuthError |= isAuthException(x);
  
              // Add the chained exceptions to the stack.
  
              if (x.getNextException() != null)
                  stack.push(x.getNextException());
              if (x.getCause() instanceof SQLException && x.getCause() != x.getNextException())
                  stack.push((SQLException) x.getCause());
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(this, tc, "isAnAuthorizationException", isAuthError);
          return isAuthError;
      }