Core Java® Volume I–Fundamentals


Chapter 7: Exceptions, Assertions, and Logging



Download 37,53 Mb.
Pdf ko'rish
bet8/34
Sana06.01.2022
Hajmi37,53 Mb.
#325163
1   ...   4   5   6   7   8   9   10   11   ...   34
Bog'liq
9780134177373-Vol-1

357

Chapter 7: Exceptions, Assertions, and Logging .....................................

358


Dealing with Errors .................................................................................

7.1


359

The Classification of Exceptions ..............................................

7.1.1

361


Declaring Checked Exceptions ................................................

7.1.2


364

How to Throw an Exception ....................................................

7.1.3

Contents


x

From the Library of Hristo Dimov Hristov




ptg18360597

365


Creating Exception Classes ......................................................

7.1.4


367

Catching Exceptions ................................................................................

7.2

367


Catching an Exception ..............................................................

7.2.1


369

Catching Multiple Exceptions .................................................

7.2.2

370


Rethrowing and Chaining Exceptions ...................................

7.2.3


372

The 


finally

 Clause .......................................................................

7.2.4

376


The Try-with-Resources Statement .........................................

7.2.5


377

Analyzing Stack Trace Elements ..............................................

7.2.6

381


Tips for Using Exceptions .......................................................................

7.3


384

Using Assertions ......................................................................................

7.4

384


The Assertion Concept ..............................................................

7.4.1


385

Assertion Enabling and Disabling ..........................................

7.4.2

386


Using Assertions for Parameter Checking .............................

7.4.3


387

Using Assertions for Documenting Assumptions ................

7.4.4

389


Logging .....................................................................................................

7.5


389

Basic Logging .............................................................................

7.5.1

390


Advanced Logging ....................................................................

7.5.2


392

Changing the Log Manager Configuration ...........................

7.5.3

393


Localization ................................................................................

7.5.4


394

Handlers .....................................................................................

7.5.5

398


Filters ...........................................................................................

7.5.6


399

Formatters ..................................................................................

7.5.7

399


A Logging Recipe ......................................................................

7.5.8


409

Debugging Tips ........................................................................................

7.6


Download 37,53 Mb.

Do'stlaringiz bilan baham:
1   ...   4   5   6   7   8   9   10   11   ...   34




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish