Dear friends, why won't this code resizing a GIF image work on Linux with JDK 1.5? It works well on WinXP with JDK 1.6. On Linux it just produces an empty thumbnail image.
[ May 03, 2008: Message edited by: Niklas Rosencrantz ]
This shows you why should never ignore any exception unless you are 100% sure it will not occur. In that case, you should document WHY it will not occur; not only for other programmers to read, but also for yourself months later.
In any case where the exception might (or will) occur, at least print its stack trace.
Originally posted by Rob Prime: This shows you why should never ignore any exception unless you are 100% sure it will not occur. In that case, you should document WHY it will not occur; not only for other programmers to read, but also for yourself months later.
At work, we even don't ignore those exceptions. We "document" them by throwing an UnreachableCodeReachedException (which is a runtime exception), and sign it with our initials:
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
catch(AvoidingTheQuestionException){ Actually, Linux with JDk 1.5 doesn't seem to support GIF writing in the standard libraries. I must upgrade to 1.6 or use third party library.