Skip to content

Commit

Permalink
Remove ErrorManager from #891, as it's no longer needed in Godot 4
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Aug 20, 2023
1 parent d1e6dd4 commit 17a4a2d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 117 deletions.
1 change: 0 additions & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Export="*res://src/Autoload/Export.gd"
Palettes="*res://src/Autoload/Palettes.gd"
Keychain="*res://addons/keychain/Keychain.gd"
ExtensionsApi="*res://src/Autoload/ExtensionsAPI.gd"
ErrorManager="*res://src/Autoload/ErrorManager.gd"

[debug]

Expand Down
108 changes: 0 additions & 108 deletions src/Autoload/ErrorManager.gd

This file was deleted.

5 changes: 1 addition & 4 deletions src/Autoload/Export.gd
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,7 @@ func export_processed_images(
var err := processed_images[i].save_png(export_paths[i])
if err != OK:
Global.error_dialog.set_text(
(
tr("File failed to save. Error code %s")
% str(err, ErrorManager.parse(err, " (", ")"))
)
tr("File failed to save. Error code %s (%s)") % [err, error_string(err)]
)
Global.error_dialog.popup_centered()
Global.dialog_open(true)
Expand Down
5 changes: 2 additions & 3 deletions src/Autoload/OpenSave.gd
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ func open_pxo_file(path: String, untitled_backup: bool = false, replace_empty: b
var err := FileAccess.get_open_error()
if err != OK:
Global.error_dialog.set_text(
tr("File failed to open. Error code %s") % str(err, ErrorManager.parse(err, " (", ")"))
tr("File failed to open. Error code %s (%s)") % [err, error_string(err)]
)
Global.error_dialog.popup_centered()
Global.dialog_open(true)
file.close()
return

var empty_project: bool = Global.current_project.is_empty() and replace_empty
Expand Down Expand Up @@ -395,7 +394,7 @@ func save_pxo_file(
if temp_path.is_valid_filename():
return
Global.error_dialog.set_text(
tr("File failed to save. Error code %s") % str(err, ErrorManager.parse(err, " (", ")"))
tr("File failed to save. Error code %s (%s)") % [err, error_string(err)]
)
Global.error_dialog.popup_centered()
Global.dialog_open(true)
Expand Down
2 changes: 1 addition & 1 deletion src/Preferences/HandleExtensions.gd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func _add_extension(file_name: String) -> void:
var extension_config_file := FileAccess.open(extension_config_file_path, FileAccess.READ)
var err := FileAccess.get_open_error()
if err != OK:
print("Error loading config file: ", err, ErrorManager.parse(err, " (", ")"))
print("Error loading config file: ", err, " (", error_string(err), ")")
extension_config_file.close()
return

Expand Down

0 comments on commit 17a4a2d

Please # to comment.