The println in question is inside Log.d, which you are calling
incorrectly. The first argument is an identifier tag; the second
should be your message string.

I don't really recommend catching exceptions this way, and only
printing the message. Especially since the message can be null -- at
least print ex.toString() instead! That will at least include the
class name of the exception, even if there is no message.

But you're also discarding the stack trace, which is often more
important than the message. And by suppressing the Force Close dialog,
you're making your app just fail to function, possibly continuing on
in a broken state, or possibly leaving the user thinking that
something worked when it didn't. You'll need to think carefully about
that aspect. Sometimes it's better to just NOT catch the exception. I
use Flurry to centrally report them, but don't catch them unless I
have a specific recovery action.

On Apr 5, 8:46 am, RMD <[email protected]> wrote:
> At the risk of being annoying I'll keep on sharing...
>
> I put this catch in for when I try to send a SMS
>
>             try {
>                 sms.sendSMS(phoneNo, v);
>                         } catch (Exception ex)
>                         {
>                                 Log.d("EXCEPTION 
> SendSMS>>>>-------------------------}> ",
> ex.getMessage());
>                         }
>
> And got this exception
> 04-05 11:38:04.870: DEBUG/EXCEPTION
> SendSMS>>>>-------------------------}>(443): println needs a message
>
> There is no println in my code.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to