Hi I have a terrible memory and I wanted to print out class diagram of Java SE Exception Classes hang it on the wall or something I know I don't need to memorize it, It's just when you're designing a software or preparing for an exam it's good to have stuff like these around you.
I've googled most of the pictures aren't complete and are bad quality, So I was thinking of converting Javadocs to UML ? then print out the uml maybe
Can someone help me please ?
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch. The class Exception and any subclasses that are not also subclasses of RuntimeException are checked exceptions.
In the UML, an exception is a specialization of a signal, which is the specification of an asynchronous communication between objects. This means that in interaction diagramsinteraction diagramsA sequence diagram or system sequence diagram (SSD) shows process interactions arranged in time sequence in the field of software engineering. It depicts the processes involved and the sequence of messages exchanged between the processes needed to carry out the functionality.https://en.wikipedia.org › wiki › Sequence_diagramSequence diagram - Wikipedia, exceptions are illustrated as asynchronous messages.
The class at the top of the exception class hierarchy is the Throwable class, which is a direct subclass of the Object class. Throwable has two direct subclasses - Exception and Error. The Exception class is used for exception conditions that the application may need to handle.
Definition: An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system.
I can't remember all of them, either. When in eclipse I simply use the built-in functionality to display the hierarchy:
Not really the answer to your question, but this works fine for me and everyone I've talked to so far.
BTW: Make a screenshot of the "Hierarchy" view and this is the answer to your question :-)
Few statistics from OpenJDK 7u3 rt.jar:
So it's impossible to have full diagram. Probably you will not use exceptions from subpackages of com.sun, org.omg or most of javax. Normally you work on some subset of exceptions. I personally use the same approach as SJuan - search for exceptions in one particular package or package subtree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With