Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
opt: auto safe mode Exception records textview desc
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Apr 8, 2024
1 parent 2163dc4 commit 96acf39
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ public static void showCrashMsgDialog(Context context, String throwClassName, St
int throwLineNumber, String throwMethodName, String longMsg, String stackTrace) {
new AlertDialog.Builder(context)
.setCancelable(false)
.setTitle("异常记录")
.setMessage("抛错类: " + throwClassName + "\n抛错文件: " + throwFileName + "\n抛错方法: " + throwMethodName +
"\n抛错行: " + throwLineNumber + "\n异常信息: \n" + longMsg + "\n堆栈跟踪: \n" + stackTrace)
.setTitle(R.string.safe_mode_recorder_title)
.setMessage(
"[" + context.getString(R.string.safe_mode_recorder_file) + "]: " + throwFileName +
"\n[" + context.getString(R.string.safe_mode_recorder_class) + "]: " + throwClassName +
"\n[" + context.getString(R.string.safe_mode_recorder_method) + "]: " + throwMethodName +
"\n[" + context.getString(R.string.safe_mode_recorder_line) + "]: " + throwLineNumber +
"\n[" + context.getString(R.string.safe_mode_recorder_msg) + "]: " + longMsg +
"\n[" + context.getString(R.string.safe_mode_recorder_st) + "]: " + stackTrace)
.setHapticFeedbackEnabled(true)
.setPositiveButton(android.R.string.ok, (dialog, which) -> dialog.dismiss())
.show();
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,13 @@
<string name="safe_mode_ok">稍后处理</string>
<string name="safe_mode_later_title">提示</string>
<string name="safe_mode_later_desc">仍处于安全模式中,HyperCeiler对其的功能已停用。\n是否解除安全模式?</string>
<string name="safe_mode_recorder_title">异常记录</string>
<string name="safe_mode_recorder_file">文件名</string>
<string name="safe_mode_recorder_class">抛出类</string>
<string name="safe_mode_recorder_method">抛出方法</string>
<string name="safe_mode_recorder_line">行号</string>
<string name="safe_mode_recorder_msg">异常类型及信息</string>
<string name="safe_mode_recorder_st">异常堆栈内容</string>

<string name="tip_default">Tip: 这里是默认 tip ~ 如果你能看见我,就说明 HyperCeiler 出现了问题,请及时且有效的反馈给开发者。</string>

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,13 @@
<string name="safe_mode_ok">Deal with it later</string>
<string name="safe_mode_later_title">Tip</string>
<string name="safe_mode_later_desc">is still in safe mode and HyperCeiler functionality has been disabled. Disable safe mode?</string>
<string name="safe_mode_recorder_title">Exception records</string>
<string name="safe_mode_recorder_file">File</string>
<string name="safe_mode_recorder_class">Class</string>
<string name="safe_mode_recorder_method">Method</string>
<string name="safe_mode_recorder_line">Line</string>
<string name="safe_mode_recorder_msg">Exception Message</string>
<string name="safe_mode_recorder_st">Stack Trace</string>
<string name="tip_default">Tip: Here is the default tip. If you can see me, it means that there is a problem with HyperCeiler, please report it to the developer in a timely and effective manner.</string>

<string name="preference_recommend_tip">Looking for something else?</string>
Expand Down

0 comments on commit 96acf39

Please sign in to comment.