自定义异常的步骤:
1:定义一个子类继承Exception或RuntimeException,让该类具备可抛性。
2:通过throw 或者throws进行操作。
posted on 2017-02-17 10:13 cxr119911 阅读(159) 评论(0) 收藏 举报