官术网_书友最值得收藏!

5. Exceptions

Overview

This chapter discusses how exceptions are dealt with in Java. You will first learn how to identify the situations that produce exceptions in your code. This knowledge will simplify the process of handling these exceptions by alerting you to those circumstances in which they are most likely to arise. In this endeavor, this chapter also provides a list of best practices guiding you through common scenarios and the best methods of either catching exceptions or throwing them to the calling class, logging their details as you go. You will further learn to differentiate between different types of exceptions, and practice the techniques for handling each. By the end of the chapter, you will even be able to create your own exception class, capable of logging each type of exception in order of severity.

主站蜘蛛池模板: 信宜市| 曲周县| 永济市| 揭阳市| 贵德县| 瓦房店市| 叙永县| 民和| 柘荣县| 鹤峰县| 丰顺县| 怀化市| 新龙县| 普宁市| 蓝山县| 太和县| 池州市| 永吉县| 永和县| 永康市| 崇仁县| 巴彦县| 彭阳县| 都安| 西乡县| 靖边县| 鄄城县| 丰宁| 姚安县| 新余市| 泰宁县| 通州区| 五指山市| 青冈县| 察哈| 梁平县| 黄浦区| 永修县| 怀柔区| 德州市| 汉沽区|