Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.util.Log;
import android.widget.Toast;

public class Main {
    /**
     * This method provides uniform exception handling functionality
     * @param context
     * @param e
     * @param errmsg
     */
    public static void handleException(Context context, Exception e, String errmsg) {
        Toast.makeText(context, "(e) " + errmsg, Toast.LENGTH_LONG).show();
        Log.e("Yum Exception!", errmsg);
        Log.e("Yum Exception!", e.toString());
    }
}