Image loading error reporting / handling
David Hill
David.Hill at Oracle.com
Tue Jun 26 09:07:58 PDT 2012
Lubo,
> Image/Media need consistent error reporting
> (http://javafx-jira.kenai.com/browse/RT-976)
Wow, I remember filing that one in 2008 ! :-)
While I understand the attraction of an exception being thrown, I think it is reasonable just to set an error indicator as well. When I filed the jira in '08, I could know that a image load failed but not why, and the why is often the important bit. Was it memory, broken image, no connection to host ..... At the time I was thinking we could just enumerate the known causes.
Hanging an exception off of the image class would have some memory issues if the user does not discard the object.
Be careful how you define setOnLoadingProgress - I have seen cases with JavaIIO where we spent more time updating on progress on a small image than decoding. Imagine on a small gif image updating progress every 10% for a 64x64.
Dave
>
>
>
--
David Hill <David.Hill at Oracle.com>
Java Embedded Development
America's greatest strength, and its greatest weakness, is our belief in second chances, our belief that we can always start over, that things can be made better.
-- Anthony Walton
More information about the openjfx-dev
mailing list