I have the following code...

        @Override
        protected Void doInBackground(Void... unused) {
                Log.i(TAG, "invoking background thread");

                        try {
                                mClient.get("http://thishostdoesntexist";);
                        } catch (RuntimeException e) {
                                mActivity.onTaskError(e.getMessage());
                        } catch (HttpResponseException e) {
                                mActivity.onTaskError(e.getMessage());
                        } catch (ClientProtocolException e) {
                                mActivity.onTaskError(e.getMessage());
                        } catch (UnknownHostException e) {
                                mActivity.onTaskError(e.getMessage());
                        } catch (IOException e) {
                                mActivity.onTaskError(e.getMessage());
                        }

                Log.i(TAG, "exiting background thread");
                return null;
        }

My mClient get method is a simple HttpClient execute with an output
buffer to read the input stream, so it's very trivial. Everytime I
execute this task UnknownHostException will be triggered which will in
turn call onTaskError on my currect Activity, but I still get a
RuntimeException, but I don't see why. Maybe it's because it's late
and i've done about 12 hours of writing code so it's something simple
I just can't see?

What should I be looking for?

Thanks in advance

-- 
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