Well, Surprisingly, Sun has named one exception as Headless exception, and it reason for the error is inline with the exception name. May be a developer in sun Might have no idea of the error when he deloped it, and named it like that....
Most funny part is the Javadoc, given below is the snippet from it..
"Thrown when code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse."
Error trace :-(
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:121)
at java.awt.Window.
at java.awt.Frame.
"Calling getCause() gets the cause that caused the throwable to be thrown and when you've got the cause that threw the throwable, you'll know what caused the exception "
No comments:
Post a Comment