From 0c3134f5c52a8d64ff8efe7d5b89e1678305e64e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 2 May 2024 18:44:47 +0800 Subject: [PATCH] Update compiler.cpp --- src/compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index ee9a4d1c..889854f6 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1278,10 +1278,11 @@ __EAT_DOTS_END: std::string_view version = deserializer.read_string('\n'); if(version != PK_VERSION){ - SyntaxError(_S("precompiled version mismatch: ", version, "!=" PK_VERSION)); + Str error = _S("precompiled version mismatch: ", version, "!=" PK_VERSION); + throw std::runtime_error(error.c_str()); } if(deserializer.read_uint('\n') != (i64)mode()){ - SyntaxError("precompiled mode mismatch"); + throw std::runtime_error("precompiled mode mismatch"); } int count = deserializer.read_count();