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

  • The Java Workshop
  • David Cuartielles Andreas G?ransson Eric Foster Johnson
  • 136字
  • 2021-06-11 13:05:25

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.

主站蜘蛛池模板: 荔波县| 武平县| 淳化县| 项城市| 白河县| 武乡县| 张家川| 新民市| 康马县| 县级市| 依安县| 奉贤区| 罗城| 达孜县| 英德市| 屏边| 永仁县| 三穗县| 池州市| 图木舒克市| 嘉黎县| 嘉峪关市| 六安市| 洛南县| 永吉县| 渑池县| 英德市| 建阳市| 伊通| 金华市| 苍南县| 盈江县| 大方县| 应城市| 印江| 阳新县| 常州市| 岢岚县| 贵港市| 北安市| 虞城县|