Just stumbled again over one of the many stupid things in the Java API: if a socket connection cannot be established, you will get this exception:
java.net.ConnectException: Connection refused
Well, I see that it doesn't work, because nothing is happening. And I could guess the connection refused from a java.net.ConnectException. But what is the address and port that could not be reached??? This is some deep-down library call in a larger webapplication, so I have no clue what ip and port he is trying.
Why is it so difficult to provide an informative error message? This is running on the 5th edition of Java, 10 years in the wild... Sun is definitely bad on the developer usability part. Really.
Posted at 11:27AM Mar 07, 2008 by Alexander Klimetschek in General | Comments[3]



Alex on API usability
Eh Alex, when was the last time you had to...
Posted by Martin Probst's Weblog on March 07, 2008 at 08:51 PM CET #
manual trackback
Posted by Martin Probst on March 07, 2008 at 08:52 PM CET #
Posted by Martin Probst on March 07, 2008 at 08:52 PM CET #