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. Ketahanan batt Rodri 1.8.1 di N

data operator nya gak idup ya? sol...

desire with miui

"Indonesian Android Community [id-android]"

PING'S mobile
Email:  Ph. (021) 96087100
Yopie Ratjoen
Email:  Ph. 08977726681
Gila original
Email:  Ph. (031) 91555898

Aturan Jual/Kloteran ID-Android

2. android installable


After we do <make> for the source that is downloaded from the repo,
the build system creates out. on the default folder. under
<~/mydroid/out/target/product/generic> path i have system.img
ramdisk.img and userdata.img. I want to integrate all these into
one .iso. so that i can install it on virtual box.

I am using linux-x86 and original repo. For some reasons I can't use
the customized android-x86.

Please suggest me how can i do this.


3. Looking for ListAdaptor pattern

4. how do i call a make file inside

5. Camera image lost when mobile turn to landscape

6. Javascript

7. ViewFlipper jump to 'page'