Source Home >> Java Source 1.6.0 >> java.lang.IllegalArgumentException V 0.09
  • 01/*
  • 02 * @(#)IllegalArgumentException.java 1.24 05/11/17
  • 03 *
  • 04 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  • 05 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  • 06 */
  • 07
  • 08package java.lang;
  • 09
  • 10/**
  • 11 * Thrown to indicate that a method has been passed an illegal or
  • 12 * inappropriate argument.
  • 13 *
  • 14 * @author unascribed
  • 15 * @version 1.24, 11/17/05
  • 16 * @see java.lang.Thread#setPriority(int)
  • 17 * @since JDK1.0
  • 18 */
  • 19public
  • 20class IllegalArgumentException extends RuntimeException {
  • 21 /**
  • 22 * Constructs an <code>IllegalArgumentException</code> with no
  • 23 * detail message.
  • 24 */
  • 25 public IllegalArgumentException() {
  • 26 super();
  • 27 }
  • 28
  • 29 /**
  • 30 * Constructs an <code>IllegalArgumentException</code> with the
  • 31 * specified detail message.
  • 32 *
  • 33 * @param s the detail message.
  • 34 */
  • 35 public IllegalArgumentException(String s) {
  • 36 super(s);
  • 37 }
  • 38
  • 39 /**
  • 40 * Constructs a new exception with the specified detail message and
  • 41 * cause.
  • 42 *
  • 43 * <p>Note that the detail message associated with <code>cause</code> is
  • 44 * <i>not</i> automatically incorporated in this exception's detail
  • 45 * message.
  • 46 *
  • 47 * @param message the detail message (which is saved for later retrieval
  • 48 * by the {@link Throwable#getMessage()} method).
  • 49 * @param cause the cause (which is saved for later retrieval by the
  • 50 * {@link Throwable#getCause()} method). (A <tt>null</tt> value
  • 51 * is permitted, and indicates that the cause is nonexistent or
  • 52 * unknown.)
  • 53 * @since 1.5
  • 54 */
  • 55 public IllegalArgumentException(String message, Throwable cause) {
  • 56 super(message, cause);
  • 57 }
  • 58
  • 59 /**
  • 60 * Constructs a new exception with the specified cause and a detail
  • 61 * message of <tt>(cause==null ? null : cause.toString())</tt> (which
  • 62 * typically contains the class and detail message of <tt>cause</tt>).
  • 63 * This constructor is useful for exceptions that are little more than
  • 64 * wrappers for other throwables (for example, {@link
  • 65 * java.security.PrivilegedActionException}).
  • 66 *
  • 67 * @param cause the cause (which is saved for later retrieval by the
  • 68 * {@link Throwable#getCause()} method). (A <tt>null</tt> value is
  • 69 * permitted, and indicates that the cause is nonexistent or
  • 70 * unknown.)
  • 71 * @since 1.5
  • 72 */
  • 73 public IllegalArgumentException(Throwable cause) {
  • 74 super(cause);
  • 75 }
  • 76
  • 77 private static final long serialVersionUID = -5365630128856068164L;
  • 78}

文件:IllegalArgumentException.java
包名:java.lang
类名:IllegalArgumentException
继承:RuntimeException
接口: