[java-gnome-hackers] Should Pixbuf constructor propegate unchecked excpetion for unknown format?
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-06-16 09:43:41
|
The checkPixbuf*() methods used by the Pixbuf constructors take the GError and wrap it in an unchecked RuntimeException. These crop up when, for one example, there is an "Unrecognized image file format". That certainly shouldn't be so vague as a RuntimeException, and now that I'm running into them I'm not entirely convinced it should be unchecked. So, checked or unchecked? And, which particular exception for this case? If checked, IOException? If unchecked, the ever-trusty IllegalArgumentException? [This is another instance where the lack of specificity of our wrapping GError is turning up. I have a feeling we need to start passing some identifiers or Constants through with error domain and the specific error enum so that the Java side code can, when the error is understandable, raise something a bit more appropriate] AfC Sydney -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management. We actively carry out research and development in these areas on behalf of our clients, and enable successful use of open source in their mission critical enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London |