Skip to content

Commit

Permalink
Fixed no line highlight when crashing in debug
Browse files Browse the repository at this point in the history
Fix #8
  • Loading branch information
ZiYueCommentary committed Aug 29, 2024
1 parent 557c34c commit 274d95e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MultiLang/English.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static constexpr MultiLang::string string_parameter_greater = "parameter must be
static constexpr MultiLang::string userlib_not_found = "User lib not found: {0}";
static constexpr MultiLang::string userlib_function_not_found = "User lib function not found: {0}";
static constexpr MultiLang::wstring integer_divide_zero = L"Integer divide by zero.";
static constexpr MultiLang::wstring memory_access_violation = L"Memory Access Violation!\nThe program attempted to read or write to a protected memory address.";
static constexpr MultiLang::string memory_access_violation = "Memory Access Violation!\nThe program attempted to read or write to a protected memory address.";
static constexpr MultiLang::wstring illegal_instruction = L"Illegal instruction.\nProcess tried to execute an invalid CPU instruction.";
static constexpr MultiLang::wstring stack_overflow = L"Stack overflow.\nMake sure there is no recursion without a base case.";
static constexpr MultiLang::wstring integer_overflow = L"Integer overflow!\nMake sure the integer doesnt exceed a value of 2147483647.";
Expand Down
2 changes: 1 addition & 1 deletion MultiLang/SimplifiedChinese.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
static constexpr MultiLang::string userlib_not_found = "用户库未找到:{0}";
static constexpr MultiLang::string userlib_function_not_found = "用户库函数未找到:{0}";
static constexpr MultiLang::wstring integer_divide_zero = L"整数除零";
static constexpr MultiLang::wstring memory_access_violation = L"内存访问冲突!\n程序试图读取或写入受保护的内存地址。";
static constexpr MultiLang::string memory_access_violation = "内存访问冲突!\n程序试图读取或写入受保护的内存地址。";
static constexpr MultiLang::wstring illegal_instruction = L"非法指令。\n程序试图执行无效的CPU指令";
static constexpr MultiLang::wstring stack_overflow = L"堆栈溢出!\n请确保程序内没有递归现象";
static constexpr MultiLang::wstring integer_overflow = L"整数溢出!\n请确保整数的值不超过2147483647";
Expand Down
2 changes: 1 addition & 1 deletion MultiLang/TraditionalChinese.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
static constexpr MultiLang::string userlib_not_found = "使用者庫未找到:{0}";
static constexpr MultiLang::string userlib_function_not_found = "使用者庫函式未找到:{0}";
static constexpr MultiLang::wstring integer_divide_zero = L"整數除零";
static constexpr MultiLang::wstring memory_access_violation = L"記憶體訪問衝突!\n程式試圖讀取或寫入受保護的記憶體地址。";
static constexpr MultiLang::string memory_access_violation = "記憶體訪問衝突!\n程式試圖讀取或寫入受保護的記憶體地址。";
static constexpr MultiLang::wstring illegal_instruction = L"非法指令。\n程式試圖執行無效的CPU指令";
static constexpr MultiLang::wstring stack_overflow = L"堆疊溢位!\n請確保程式內沒有遞迴現象";
static constexpr MultiLang::wstring integer_overflow = L"整數溢位!\n請確保整數的值不超過2147483647";
Expand Down
4 changes: 0 additions & 4 deletions bbruntime/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,6 @@ void bbRuntimeStats() {
gx_runtime->debugLog(std::format(MultiLang::stats_unreleased, unrelObjCnt).c_str());
}

void bbMav() {
bbruntime_panic(MultiLang::memory_access_violation);
}

bool basic_create() {
next_handle = 0;
handle_map.clear();
Expand Down
2 changes: 1 addition & 1 deletion bbruntime_dll/bbruntime_dll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ inline std::string replace_all(const std::string& string, const std::string& pat

inline void throw_mav() {
if (ErrorMessagePool::memoryAccessViolation == 0) {
bbruntime_panic(MultiLang::memory_access_violation);
RTEX(MultiLang::memory_access_violation);
}
else {
std::string s = "";
Expand Down

0 comments on commit 274d95e

Please # to comment.