Search in sources :

Example 1 with Exceptional

use of com.andframe.model.Exceptional in project AndFrameWorks by scwang90.

the class AfExceptionHandler method getHandler.

public static Exceptional getHandler(Thread thread, Throwable ex, String remark) {
    Exceptional ehandler = new Exceptional();
    ehandler.Thread = "异常线程:" + thread;
    DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
    ehandler.Remark = remark;
    ehandler.Name = getExceptionName(ex);
    ehandler.Message = getExceptionMessage(ex);
    ehandler.Stack = getAllStackTraceInfo(ex);
    ehandler.Version = AfApp.get().getVersion();
    ehandler.Device = android.os.Build.MODEL;
    ehandler.OpeateSystem = android.os.Build.VERSION.RELEASE;
    ehandler.ScreneWidth = metrics.widthPixels;
    ehandler.ScreneHeight = metrics.heightPixels;
    return ehandler;
}
Also used : Exceptional(com.andframe.model.Exceptional) DisplayMetrics(android.util.DisplayMetrics)

Aggregations

DisplayMetrics (android.util.DisplayMetrics)1 Exceptional (com.andframe.model.Exceptional)1