bugly上傳自定義異常(Android)

CrashReport.postException 上傳, 8->JS腳本錯誤 5、6->LUA 詳情見截圖

  int category = 8;
  CrashReport.postException(category,type,error,stackTrace,extraInfo);
bugly錯誤類型
Android bugly異常category

CrashReport.postCatchedException上傳 ,flutter 發(fā)錯誤堆棧string到原生,原生調(diào)用對應(yīng)方法上報

按照堆棧信息重組數(shù)據(jù),否則堆棧信息顯示的是原生對應(yīng)行數(shù)的Throwable
StackTraceElement stackTraceElement = new StackTraceElement(String declaringClass, String methodName,
                             String fileName, int lineNumber);
CrashReport.postCatchedException(new FlutterException(format,stackTraceElements));

class FlutterException extends Throwable{
        public FlutterException(String message,StackTraceElement[] stackTraceElements) {
            super(message);
            setStackTrace(stackTraceElements);
        }
    }
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容