Thursday, November 16, 2006

Headless error....

Have you ever debugged an issue, which u have no clue atall, in otherwords, an issue which doesn't have any head or tail, when you cant make anything out of the error,when it is noway close to an known error, and more importantly it is occuring on somebody else code(shit !!), which you are debuggin now...




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.(Window.java:274)
at java.awt.Frame.(Frame.java:401)


"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: