use Toast to show Exception - Android User Interface

Android examples for User Interface:Toast

Description

use Toast to show Exception

Demo Code


//package com.java2s;

import android.content.Context;

import android.widget.Toast;

public class Main {
    public static void showException(Context context, Throwable e) {
        Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT);
    }/*from w  ww  .j  a  va 2 s . c  o  m*/
}

Related Tutorials