feat: Add error handling for turtle startup script and improve GPS retry logic
This commit is contained in:
@@ -34,8 +34,21 @@ if response then
|
||||
print("Starting turtle program...")
|
||||
sleep(1)
|
||||
|
||||
-- Run the script
|
||||
shell.run(SCRIPT_NAME)
|
||||
-- Run the script with error handling
|
||||
local success, error = pcall(function()
|
||||
shell.run(SCRIPT_NAME)
|
||||
end)
|
||||
|
||||
if not success then
|
||||
print("")
|
||||
print("========================================")
|
||||
print(" ERROR OCCURRED!")
|
||||
print("========================================")
|
||||
print(error)
|
||||
print("")
|
||||
print("Press any key to see error details...")
|
||||
os.pullEvent("key")
|
||||
end
|
||||
else
|
||||
print("✗ Download failed!")
|
||||
print("Please check:")
|
||||
|
||||
Reference in New Issue
Block a user