zoukankan      html  css  js  c++  java
  • IllegalArgumentException 介绍

    java.lang 
    类 IllegalArgumentException
    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  java.lang.IllegalArgumentException
    全部已实现的接口: 
    Serializable 
    直接已知子类: 
    IllegalCharsetNameException, IllegalFormatException, IllegalSelectorException, IllegalThreadStateException, InvalidKeyException, InvalidOpenTypeException, InvalidParameterException, KeyAlreadyExistsException, NumberFormatException, PatternSyntaxException, UnresolvedAddressException, UnsupportedAddressTypeException, UnsupportedCharsetException 
    
    --------------------------------------------------------------------------------
    
    public class IllegalArgumentExceptionextends RuntimeException抛出的异 常表明向方法传递了一个不合法或不对的參数。 
    
    
    
    从下面版本号開始: 
    JDK1.0 
    另请參见:
    Thread.setPriority(int), 序列化表格
    
    --------------------------------------------------------------------------------
    
    构造方法摘要 
    IllegalArgumentException() 
              构造不带具体消息的 IllegalArgumentException。 
    IllegalArgumentException(String s) 
              构造带指定具体消息的 IllegalArgumentException。 
    IllegalArgumentException(String message, Throwable cause) 
              依据指定的具体消息和原因构造一个新异常。 
    IllegalArgumentException(Throwable cause) 
              依据指定的原因和 (cause==null ? null :cause.toString()) 的具体消息构造一个新异常(它通常包括 cause 的类和具体消息)。 
      方法摘要 
      从类 java.lang.Throwable 继承的方法 
    fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
      从类 java.lang.Object 继承的方法 
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
      
    
    构造方法具体信息 
    
    
    IllegalArgumentException
    public IllegalArgumentException()构造不带具体消息的 IllegalArgumentException。 
    
    
    --------------------------------------------------------------------------------
    
    IllegalArgumentException
    public IllegalArgumentException(String s)构造带指定具体消息的 IllegalArgumentException。 
    
    參数:
    s - 具体消息。
    
    --------------------------------------------------------------------------------
    
    IllegalArgumentException
    public IllegalArgumentException(String message,
                                    Throwable cause)依据指定的具体消息和原因构造一个新异常。 
    注意,与 cause 相关的具体消息不是 自己主动合并到这个异常的具体消息中的。 
    
    
    參数:
    message - 具体消息(保存此消息,以便以后通过 Throwable.getMessage() 方法获取它)。
    cause - 原因(保存此原因,以便以后通过 Throwable.getCause() 方法获取它)。(同意使用 null 值,指出原因是不存在的或是未知的。)
    从下面版本号開始: 
    1.5 
    
    --------------------------------------------------------------------------------
    
    IllegalArgumentException
    public IllegalArgumentException(Throwable cause)依据指定的原因和 (cause==null ? null :cause.toString()) 的具体消息构造一个新异常(它通常包括 cause 的类和具体消息)。 此构造方法对于那些与其它 throwable(比如,PrivilegedActionException)的包装器同样的异常来说是实用的。 
    
    參数:
    cause - 原因(保存此原因,以便以后通过 Throwable.getCause() 方法获取它)。(同意使用 null 值,指出原因是不存在的或是未知的。)
    从下面版本号開始: 
    1.5
  • 相关阅读:
    继承
    iOS 适配暗黑模式
    【C++ STL】容器的选择
    纳税相关
    SwiftUI状态绑定:@State
    python 中各种容器可以容纳的数据类型
    open GL 在使用材质属性glMaterial设置物体颜色效果时,使用shader和使用固定管线后颜色区别
    做为一名测试工程师,你经常会用到或听到的那些工具
    推荐一款技术人必备的接口测试神器:Apifox
    测试管理工具推荐
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/4245423.html
Copyright © 2011-2022 走看看