< prev index next >

src/java.base/share/classes/java/lang/IllegalStateException.java

Print this page




  76     }
  77 
  78     /**
  79      * Constructs a new exception with the specified cause and a detail
  80      * message of {@code (cause==null ? null : cause.toString())} (which
  81      * typically contains the class and detail message of {@code cause}).
  82      * This constructor is useful for exceptions that are little more than
  83      * wrappers for other throwables (for example, {@link
  84      * java.security.PrivilegedActionException}).
  85      *
  86      * @param  cause the cause (which is saved for later retrieval by the
  87      *         {@link Throwable#getCause()} method).  (A {@code null} value is
  88      *         permitted, and indicates that the cause is nonexistent or
  89      *         unknown.)
  90      * @since  1.5
  91      */
  92     public IllegalStateException(Throwable cause) {
  93         super(cause);
  94     }
  95 

  96     static final long serialVersionUID = -1848914673093119416L;
  97 }


  76     }
  77 
  78     /**
  79      * Constructs a new exception with the specified cause and a detail
  80      * message of {@code (cause==null ? null : cause.toString())} (which
  81      * typically contains the class and detail message of {@code cause}).
  82      * This constructor is useful for exceptions that are little more than
  83      * wrappers for other throwables (for example, {@link
  84      * java.security.PrivilegedActionException}).
  85      *
  86      * @param  cause the cause (which is saved for later retrieval by the
  87      *         {@link Throwable#getCause()} method).  (A {@code null} value is
  88      *         permitted, and indicates that the cause is nonexistent or
  89      *         unknown.)
  90      * @since  1.5
  91      */
  92     public IllegalStateException(Throwable cause) {
  93         super(cause);
  94     }
  95 
  96     @java.io.Serial
  97     static final long serialVersionUID = -1848914673093119416L;
  98 }
< prev index next >