zoukankan      html  css  js  c++  java
  • 常用的异常

    常用的异常

    异常 使用场合
    IllegalArgumentException 非null的参数不正确
    IllegalStateException 对于方法调用而言,对象状态不合适
    NullPointerException 在禁止使用null的情况下使用参数值为null
    IndexOutOfBoundsException 下标参数越界
    ConcurrentModificationException 在禁止使用并发修改的情况下,检测到对象的并发修改
    UnsipportedOperationException 对象不支持用户请求的方法

    常见的异常

    异常 解释
    ClassNotFoundException 指定的类不存在
    ArithmeticException 数学运算异常
    ArrayIndexOutOfBoundsException 数组下标越界(扩展)
    IllegalAccessException 没有访问权限
    NumberFormatException 字符串转换为数字类型时抛出的异常
    ClassCastException 数据类型转换异常
    SQLException 操作数据库异常类
  • 相关阅读:
    Django 框架
    Git 教程
    Vue详解
    pycharm激活码
    通过元类创建一个Python类
    re模块
    selenium模块
    Beautifulsoup模块基础详解
    requests库
    Urllib库
  • 原文地址:https://www.cnblogs.com/mr-cc/p/5825210.html
Copyright © 2011-2022 走看看