Skip to content

Commit 4bad0c1

Browse files
authored
refactor: ♻️ lowered the log level from fatal to error (#304)
It can be confusing when the assert is triggered in the utility function, as the error message is naturally more generic. Reducing it to just "error" allows the calling function to assert and provide a more detailed error message.
1 parent 8327385 commit 4bad0c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/mod_loader/internal/path.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static func get_file_paths_in_dir(src_dir_path: String) -> Array:
113113
var error := directory.open(src_dir_path)
114114

115115
if not error == OK:
116-
ModLoaderLog.fatal("Encountered an error (%s) when attempting to open a directory, with the path: %s" % [error, src_dir_path], LOG_NAME)
116+
ModLoaderLog.error("Encountered an error (%s) when attempting to open a directory, with the path: %s" % [error, src_dir_path], LOG_NAME)
117117
return file_paths
118118

119119
directory.list_dir_begin()
@@ -134,7 +134,7 @@ static func get_dir_paths_in_dir(src_dir_path: String) -> Array:
134134
var error := directory.open(src_dir_path)
135135

136136
if not error == OK:
137-
ModLoaderLog.fatal("Encountered an error (%s) when attempting to open a directory, with the path: %s" % [error, src_dir_path], LOG_NAME)
137+
ModLoaderLog.error("Encountered an error (%s) when attempting to open a directory, with the path: %s" % [error, src_dir_path], LOG_NAME)
138138
return dir_paths
139139

140140
directory.list_dir_begin()

0 commit comments

Comments
 (0)