Wrap the issue in a try catch block and log the exception. You'll get much more detailed info.
On Wed, Oct 8, 2008 at 4:32 PM, Jason Proctor <[EMAIL PROTECTED]> wrote: > > dear google, any chance of better error messages from the android > classes? usually, the java frameworks have nice developer-friendly > (as opposed to user-friendly) messages in exceptions when things go > wrong. but it seems that with the android.* packages, errors are > unexpected and the message is invariably some variation on -- > > error code -1: unknown error > > -- which isn't very helpful. that's the actual error message when an > application tries to open a socket and doesn't have internet > permission. this led to numerous list threads etc which could have > been avoided if the piece of code discovering the problem and > throwing the exception had included a better message. then the > solution would have been obvious. > > i'm running into another one at the moment. if MediaPlayer doesn't > like the data it's presented with, it will throw during prepare(). > the error message i'm looking at is -- > > error: Prepare failed: status=0xffffffff > > -- which is, you guessed it, error code -1 again. there are numerous > possible error cases here, and the code which threw the exception > knew what the problem was, so why didn't it tell us? i'm going to > have to start another list thread on streaming http, because i can't > tell what the problem is. i *know* prepare() failed, how about > telling me WHY?? > > thanks in advance. > > j > > > > > -- ~chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

