I have an asynctask that’s trying to send a mail in background. If the password or something else is not set up properly it throws exception. Depending of what exception it throws I need to show different text on toast. How can I get what exception was thrown so I can deal with this.
Share
First catch the exception using
try catchblock.Then you can show toast on eachExceptionBlock. You can catch specificexceptionsand do according to your needs.For e.g..:
etc.. like this…!!