Skip to content

Commit

Permalink
Replace printerr with push_error
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonhunt02 authored and fire committed Jan 25, 2025
1 parent 6f5440b commit ed9cfe2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions vsk_exporter.gd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func get_valid_filenames(p_filename: String, p_validator: RefCounted, p_existing
if instantiate != null:
p_existing_valid_filenames = get_valid_filenames(instantiate.get_path(), p_validator, p_existing_valid_filenames)
else:
printerr("File does not exist: %s" % p_filename)
push_error("File does not exist: %s" % p_filename)

return p_existing_valid_filenames

Expand Down Expand Up @@ -988,7 +988,7 @@ func create_temp_folder() -> int:
if !directory.dir_exists("user://temp"):
err = directory.make_dir("user://temp")
if err != OK:
printerr("Could not create temp directory. Error code %s" % error_string(err))
push_error("Could not create temp directory. Error code %s" % error_string(err))
else:
print("Created temp directory!")

Expand All @@ -1011,9 +1011,9 @@ func _link_vsk_editor(p_node: Node) -> void:

if vsk_editor and do_connect:
if vsk_editor.user_content_submission_requested.connect(self._user_content_submission_requested, CONNECT_DEFERRED) != OK:
printerr("Could not connect signal 'user_content_submission_requested'")
push_error("Could not connect signal 'user_content_submission_requested'")
if vsk_editor.user_content_submission_cancelled.connect(self._user_content_submission_cancelled, CONNECT_DEFERRED) != OK:
printerr("Could not connect signal 'user_content_submission_cancelled'")
push_error("Could not connect signal 'user_content_submission_cancelled'")


func _unlink_vsk_editor() -> void:
Expand Down Expand Up @@ -1056,7 +1056,7 @@ func _ready():
_link_vsk_editor(VSKEditor)

if create_temp_folder() != OK:
printerr("Could not create temp folder")
push_error("Could not create temp folder")


func setup() -> void:
Expand Down
4 changes: 2 additions & 2 deletions vsk_exporter_addon_interface.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ func preprocess_scene(p_node: Node, p_validator: RefCounted) -> Node:
func unregister_exporter_addon(p_addon: RefCounted) -> void: #vsk_exporter_addon_const
if p_addon:
if !exporter_addons.has(p_addon):
printerr("Tried to unregister non-existing addon %s!" % p_addon.get_name())
push_error("Tried to unregister non-existing addon %s!" % p_addon.get_name())
else:
exporter_addons.erase(p_addon)


func register_exporter_addon(p_addon: RefCounted) -> void: #vsk_exporter_addon_const
if p_addon:
if exporter_addons.has(p_addon):
printerr("Tried to unregister existing addon %s!" % p_addon.get_name())
push_error("Tried to unregister existing addon %s!" % p_addon.get_name())
else:
exporter_addons.push_back(p_addon)

0 comments on commit ed9cfe2

Please sign in to comment.