Let's say your program is going to do a lot of mathematical calculations and wants to know the available exceptions that you can catch to see if they are applicable.
Or the program will do a lot of I / O files and other things, and you want to catch certain exceptions instead of just catching an Exception.
You might want to find out if one application is applicable in an encoded script.
What is the recommended way to examine which exceptions are available to capture when creating code to perform certain activities?
IDE, Intellij Eclipse, , , , javadoc (Like FileNotFoundException) , .
FileNotFoundException
, , , , , . , , , , - . , -, K/X, , X - 0 .
K/X
javadoc ., javadoc , Runtime, .
, . , . " ". , , , , , , , , .
, , . , , esp, , .
, Javadoc , RuntimeExceptions. ( )
. , , .
, -, IOException , , , .
There are two types of exceptions: checked and unchecked. If you do not handle the checked exception, you will receive a build failure. You can identify the checked exception if you use any IDE. But an unchecked exception is complex, and you may need to refer to the API documentation to understand what it is, because if it has not been thrown, you may not know that this can happen. Again, some IDEs give you hints based on your code, for example, the class casting, null check.