davidad

permalink

Explanations of selected Java exceptions

IllegalThreadStateException: One of the screws in your computer is threaded the wrong way.

CloneNotSupportedException: You are a clone. Find the original you, tell him what you want to do and then kill yourself.

ArrayStoreException: You have used up all your arrays and need to buy more from the array store.

EmptyStackException: In order for Java to work, you must have a stack of Java books on your desk. Actually, one is enough if it is really thick.

MimeTypeParseException: You are a bad mime. No one can understand what you’re supposed to be. Try something easier, like walking-against-the-wind or trapped-in-an-invisible-box.

NotActiveException: This can mean two things. Either something is inactive and needs to be active, or something is active and needs to be inactive. Activate and inactivate things randomly until things work.

NotSerializableException: You are trying to make a TV series based on a movie.

WriteAbortedException: You need to write the word “aborted” somewhere in your program. It usually doesn’t matter where, you just have to do it.

SocketException: You have connected your computer to a power outlet of the wrong kind. Most of the times you have to find another outlet, but some computers have a switch on the back where you can set the power outlet type.

PortUnreachableException: Ports and harbors must be placed right next to a water body. If placed inland, they will be unreachable.

KeyManagementException: You have lost your key. Most likely you left it at the office (if you’re trying to enter your home) or at home (if you’re trying to enter the office).

KeyStoreException: The explanation for the previous KeyManagementException is that there is a hole in your pocket.

MarshalException: Something is wrong with your marshal. What you should do depends on what kind of marshal we are talking about. It can be a field marshal, police, firefighter or just your ordinary basic marshal. Note that this exception has nothing to do with the Republic of the Marshall Islands, a.k.a. RMI.

UnmarshalException: You have not fullfilled your duties as an officer of the law (or whatever marshal you used to work as). Note that the correct term is “used to”. You have been fired (which is really ironic if you were a firefighter).

And finally, my personal favorite:

UTFDataFormatException: UTF stands for Universal Transmission Format and is a way of transmitting data that works regardless of which format you use. You have tried to transmit data over UTF using the wrong format.

taken from rymden.nu, which has many more.

blog comments powered by Disqus