Thursday, March 17, 2011

Re: [android-developers] why can't catch the SocketTimeoutException

O, yes, as like Kostya Vasilyev discribe, it's right now, thank you very much!!


Another question,

why you so quickly find out the xml.java source code? I'm very curious about it.

I use eclipse, and press left ctrl and move the mouse on Xml.parse()
function, then click down,

it tell me "source not found".

2011/3/17 Kostya Vasilyev <kmansoft@gmail.com>:
> What?
>
> Looking at the messages you posted:
>
> 01:00:50 E/AndroidRuntime(935): FATAL EXCEPTION: SyncAdapterThread-1
>
> java.lang.AssertionError: java.net.SocketTimeoutException
>
> at android.util.Xml.parse(Xml.java:89)
>
> Looking at the source, Xml.java:
>
>     public static void parse(InputStream in, Encoding encoding,
>             ContentHandler contentHandler) throws IOException, SAXException
> {
>         try {
>             XMLReader reader = new ExpatReader();
>             reader.setContentHandler(contentHandler);
>             InputSource source = new InputSource(in);
>             source.setEncoding(encoding.expatName);
>             reader.parse(source);
>         } catch (IOException e) {
>             throw new AssertionError(e);
>         }
>     }
>
>
> Let me guess, you haven't actually tried typing three lines of code to try
> and catch AssertionError?
>
> -- Kostya
>
> 17.03.2011 11:23, a a пишет:
>
> no, it's not re-thrown, just can't catch the SockectTimeoutException.
>
> 2011/3/17 Kostya Vasilyev <kmansoft@gmail.com>:
>
> Ah (typing from the phone).
>
> Try catching AssertionError - looks that's how it gets re-thrown.
>
> 17.03.2011 8:57 пользователь "a a" <harvey.acer@gmail.com> написал:
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment