Files
settled-reach/client/addons/gdUnit4/src/monitor/ErrorLogEntry.gd
T
jpmschweitzerandClaude Opus 4.6 61e0762a84 chore(client): add gdUnit4 test framework addon
Vendor gdUnit4 for Godot 4 client testing (D-030).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:52:00 +01:00

42 lines
1023 B
GDScript

extends RefCounted
class_name ErrorLogEntry
enum TYPE {
SCRIPT_ERROR,
PUSH_ERROR,
PUSH_WARNING
}
const GdUnitTools := preload("res://addons/gdUnit4/src/core/GdUnitTools.gd")
var _type: TYPE
var _line: int
var _message: String
var _details: String
func _init(type: TYPE, line: int, message: String, details: String) -> void:
_type = type
_line = line
_message = message
_details = details
func _to_string() -> String:
return _message
static func of_push_warning(line: int, message: String, stack_trace: PackedStringArray) -> ErrorLogEntry:
return ErrorLogEntry.new(TYPE.PUSH_WARNING, line, message, "\n".join(stack_trace))
static func of_push_error(line: int, message: String, stack_trace: PackedStringArray) -> ErrorLogEntry:
return ErrorLogEntry.new(TYPE.PUSH_ERROR, line, message, "\n".join(stack_trace))
static func of_script_error(line: int, message: String, stack_trace: PackedStringArray) -> ErrorLogEntry:
return ErrorLogEntry.new(TYPE.SCRIPT_ERROR, line, message, "\n".join(stack_trace))