Issue with Catch Handler

by Johnny Molina » Fri, 22 Oct 2010 05:31:56 GMT


Sponsored Links
 Hello,

I have recently hit a snag using the Android plugin to Eclipse. For
some reason, ALL of my errors being thrown don't initialize and show
me the error. Has anyone ever seen this issue before and if so, what
did you do to correct it?

In particular, I am seeing it when I try to invoke the HTTPGet in a
HTTPClient object. If I have no connectivity, then I should get an
error. The Catch block does fire when this occurs...however, when I
check my general Exception object, the object is NULL (NULL Pointer).
Why would this happen if the catch is grabbing the exception?

My exceptions used to be working....and I was able to see the stack
trace. However, I can no longer see any stack trace regardless of the
Exception class I am using. Can someone please help me understand what
the heck is wrong with Eclipse, Android, or both? Is there something I
am missing on the configuration side?...is this a bug?

Mind you, I have already used Stack Overflow for this question. It has
been viewed 40 times but no answer yet. I hope anybody on here can
help me understand why this is occurring.

Thanks in advance,

John

--



Issue with Catch Handler

by Brad Gies » Fri, 22 Oct 2010 08:22:50 GMT


 I have had the same problem... It's not the Exception that is null, it's 
that getMessage() returns null.


In some catch blocks (I think mainly or only to do with HTTPClient, but 
it may happen also with JSON Exceptions... I can't remember) calling 
e.getMessage() returns null since I updated my SDK to 2.2, and it caused 
major issues because I normally wrote that to a log file, which meant 
that my catch block was creating an exception....


Would love to know the reason... And would be even better if it got fixed.

In the meantime, I'm doing this in my catch block if I use the message 
for ANYTHING:


                String message = ex.getMessage();
                if (message == null)
                    message = "null";

Then I write the message... It's a major pain...

I don't have an answer for you either... just letting you know it's not 
just you :)


Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
 http://bgies.com              http://nocrappyapps.com 
 http://bistroblurb.com        http://forcethetruth.com 
 http://ihottonight.com 
-----------------------------------------------------------------------
Everything in moderation, including abstinence (paraphrased)

Every person is born with a brain... Those who use it well are the successful 
happy ones - Brad Gies

Adversity can make or break you... It's your choice... Choose wisely - Brad Gies

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead




Hello, I have recently hit a snag using the Android plugin to Eclipse. For some reason, ALL of my errors being thrown don't initialize and show me the error. Has anyone ever seen this issue before and if so, what did you do to correct it? In particular, I am seeing it when I try to invoke the HTTPGet in a HTTPClient object. If I have no connectivity, then I should get an error. The Catch block does fire when this occurs...however, when I check my general Exception object, the object is NULL (NULL Pointer). Why would this happen if the catch is grabbing the exception? My exceptions used to be working....and I was able to see the stack trace. However, I can no longer see any stack trace regardless of the Exception class I am using. Can someone please help me understand what the heck is wrong with Eclipse, Android, or both? Is there something I am missing on the configuration side?...is this a bug? Mind you, I have already used Stack Overflow for this question. It has been viewed 40 times but no answer yet. I hope anybody on here can help me understand why this is occurring. Thanks in advance, John
--


Sponsored Links


Issue with Catch Handler

by John Moline » Fri, 22 Oct 2010 10:58:40 GMT


 hanks Brad. I did narrow it down to my emulator. If I run the same
process without using the emulator, it runs fine. It looks like some
sort of permissions or framework issue within the emulator.

On Thu, Oct 21, 2010 at 7:22 PM, Brad Gies <rbg...@gmail.com> wrote:
>



Issue with Catch Handler

by DanH » Sat, 23 Oct 2010 01:44:50 GMT


  vaguely recall this being mentioned as a "feature" of the emulator.
Seems odd, though, since it should be easy to fix and it makes
debugging that much harder.

On Oct 21, 9:58pm, John Moline <molinesys...@gmail.com> wrote:
> >



Other Threads

1. How can I use mp3 file's cover image?

hello,

I' making kinda music player.
and i'm going to show music file's own cover image.

how can i get file's cover image and show that image to screen?
--~--~---------~--~----~------------~-------~--~----~

2. Why corsor need to call setNotificationUri when query from content provider?





The notification is for when the data changes after the cursor has been
created, so that whoever has the cursor is notified that the data in the
cursor is now stale, and the cursor should be requeried.

--~--~---------~--~----~------------~-------~--~----~

3. java.lang.reflect.InvocationTargetException during calling a function of another application at runtime

4. Frequent loss of data connections.

5. Java is to get a new owne

6. 3D UI

7. Should external/* depend on bionic-specifics ?