mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-09 07:30:04 +00:00
Correctly extract parse errors from build reports
This commit is contained in:
parent
ee96458b56
commit
74752c561c
@ -14,6 +14,7 @@ import os.path
|
||||
|
||||
|
||||
LUA_ERROR_LOCATION = re.compile(r"^\s+(/[\w./-]+):(\d+):", re.MULTILINE)
|
||||
JAVA_LUA_ERROR_LOCATION = re.compile(r"^java.lang.IllegalStateException: (/[\w./-]+):(\d+):")
|
||||
JAVA_ERROR_LOCATION = re.compile(r"^\tat ([\w.]+)\.[\w]+\([\w.]+:(\d+)\)$", re.MULTILINE)
|
||||
ERROR_MESSAGE = re.compile(r"(.*)\nstack traceback:", re.DOTALL)
|
||||
|
||||
@ -46,6 +47,12 @@ def find_location(message: str) -> Optional[Tuple[str, str]]:
|
||||
if file:
|
||||
return file, location[2]
|
||||
|
||||
location = JAVA_LUA_ERROR_LOCATION.search(message)
|
||||
if location:
|
||||
file = find_file(location[1])
|
||||
if file:
|
||||
return file, location[2]
|
||||
|
||||
for location in JAVA_ERROR_LOCATION.findall(message):
|
||||
file = find_file(location[0].replace(".", "/") + ".java")
|
||||
if file:
|
||||
|
Loading…
x
Reference in New Issue
Block a user