Thanks a lot !!!

After more than 10 years of professional Java development, I wasn't
aware that there were Throwables that were Errors and not
Exceptions !!!

Shame on me ! ;-)

On 19 août, 07:36, gopu <[email protected]> wrote:
> Catch the error
>
> try {} catch (OutOfMemoryError e) {}
>
> On Aug 19, 10:22 am, Nivek <[email protected]> wrote:
>
> > Hello,
>
> > I'm writing an app dealing with JPEG pictures. The main Activity let
> > the user slide between a set of pictures, but if these pictures are
> > too large (imagine a set of pictures taken with a 12Mpix camera, not
> > resized), the pre-loading of the second picture throws an
> > OutOfMemoryException that leads to an immediate app VM shutdown
> > whereas I surrounded my calls to BitmapFactory.decodeXXX() whit a try/
> > catch(Exception).
>
> > So, the user gets an error message making him think the app is
> > unstable, and the app didn't have any chance of telling him what
> > really happened.
>
> > How can I handle this a more "user friendly" way ?
>
> > Can I predict the memory size that will be necessary to load a
> > compressed JPEG picture ?
>
> > Thanks for your help !
>
> > Nivek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to