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

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.

主站蜘蛛池模板: 天门市| 腾冲县| 忻城县| 梅河口市| 沙河市| 应用必备| 德化县| 广丰县| 肇源县| 垦利县| 淮北市| 舒兰市| 南昌市| 晋城| 阜阳市| 白银市| 科技| 汪清县| 左权县| 聂拉木县| 慈溪市| 绥德县| 于都县| 湟中县| 翼城县| 马关县| 遂川县| 梁河县| 育儿| 揭东县| 南安市| 舒城县| 方城县| 上林县| 大埔县| 成都市| 巴东县| 厦门市| 洪泽县| 交城县| 桐梓县|