Exception Handling in Java - (In Progress)
- Topics pertinent to Exception Handling
throws
try
catch
throw
finally
- Try with resources
java.lang.AutoCloseable
- Try with Multi-catch
- Suppressed Exceptions
- Log and re-throw or handle and declare
- Swallowing exceptions - Antipattern
- Antipatterns in exception handling
- Some pairs of (Exceptions, Errors) from
java.lang
packageIllegalAccessException
/IllegalAccessError
InstantiationException
/InstantiationError
ClassNotFoundException
/NoClassDefFoundError
NoSuchFieldException
/NoSuchFieldError
NoSuchMethodException
/NoSuchMethodError
- java.lang.IllegalStateException vs java.lang.IllegalAccessException
References:
PS: Will add little more details. Discussion/Comments will be enabled for this post after it’s updated with details.