Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    static public void saveCrashTrace(Throwable ex) {
        StackTraceElement[] elements = ex.getStackTrace();
        StringBuilder builder = new StringBuilder(ex.getMessage());
        for (StackTraceElement ele : elements) {
            builder.append('\n').append(ele.toString());
        }
        android.util.Log.e("crash", builder.toString());
    }
}