AssertionError on android.util.Xml.parse

by Cleverson » Fri, 23 Apr 2010 06:09:40 GMT

Sponsored Links

I'm getting an AssertionError when calling Xml.parse. This error
usually occurs when I run the app and keep switching the phone
connectivity from Wifi to 3G and vice versa. I checked the source code
of the android.util.Xml class and see something that I couldn't not
understand well, for example

    public static void parse(InputStream in, Encoding encoding,
            ContentHandler contentHandler) throws IOException,
SAXException {
        try {
            XMLReader reader = new ExpatReader();
            InputSource source = new InputSource(in);
        } catch (IOException e) {
            throw new AssertionError(e);

Is it "normal" to handle an IOException like it is done in this class?
I mean, why catching a checked exception and turn it to an
AssertionError? Should clients be supposed to catch AssertionErrors
when calling the parse method?

Thanks in advance!


Other Threads

1. emulator not showing app

I am new in developing app for android.
I have installed every update of android like documents, packages etc.
everything is going fine.
eclipse is not showing any kind of error.
but whenever run the emulator it boots up normally till the" unlock button"
I unlock that but* it doesn't show my app*
 no error,nothing bad in console
please help me
I have been trying since last three days


2. How to track ads in android


I am trying to track ads from different applications on android. I
want to know all the ads which are being used in different apps. For
this i am trying to catch the call to admob. Is there any way so that
we can get the pocessid of the process whihc shows the ad . And can we
get more information about the ad . Can you please suggest me if there
are some methods in which we can do this.



3. DEBUG/SntpClient(66): request time failed: Address family not supported by protocol

4. What is "Failed to finish input event. Check logs for details." Runtime crash?

5. How to build init.rc for the android filesystem

6. Permission denied in android2.3

7. Method native_getParameters() documentation