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. change input language in android

I always configure the UI of my mobile phones with english. But I
write sms in French, German, English & Spanish. Android does not seem
to offer the possibility to quickly change the input language of the
keyboard. It looks like UI language both determines keyboard layout
and input language, which is EXTREMELY inconvenient for someone using
several languages on a daily basis.

Does it exist a workaround, an external app or a feature I oversaw to
solve this MAJOR drawback?
Thanks for the help

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

2. htc dream - Canadian version

I was never much into cell phones, my last phone was about 6+ years
old (Motorola T720 - I think).  Being a developer, I was extremely
interested in the 'Google phone' with android, and finally it has
arrived in Canada.  Needless to say, I am now a Google phone owner.

I do have (unfounded/skeptical) reservations about the phone though.
It looks like Rogers has their own firmware installed, removed the
Google branding from the back, and installed some of their own stuff.
My biggest worry is that they might have crippled the phone in some
manner that I am not aware of.

For example, they have added Exchange ActiveSync plus a bunch of (non-
removable) links to their own web pages (shopping, Rogers accounts,
etc).  Fine, although I won't be using these, they don't bother me for
simply 'being there'.

I have the HTC Dream, which has the physical keyboard, but it is
missing the soft keyboard that the Cupcake update had provided.  One,
is this normal?  I would think that adding this would be trivial
regardless of a physical keyboard or not.  I had installed a keyboard
app from Android Market, but it doesn't show up in the 'Select input
method' when I try to compose a message.  Or I could be doing it
wrong...

Anybody else run into roadblocks or limited functionality?  I would
hate to get the phone specifically to develop on, and have it {*filter*}out
on me because they disabled some portion of Android development or
something stupid like that.

Or it could just be that I am paranoid and mistrustful of the
corporate empire of Rogers Canada.

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

3. Web Designing

4. How to save a preview frame as a JPG image

5. Syncing contacts direct to pc

6. Android porting on beagle board

7. Desktop,laptop computers and cameras