Refactored test file code and fixed error. #52
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ald_productions/spacebase-v2-updated-code!52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-motd-test-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The following error occurs when the MOTD test file is unavailable:
Main error: Data/Scripts/UI/StartMenu.lua:159: attempt to index local 'f' (a nil value) appVersion: Unofficial Version 1.07 appBuild: 1
StackTrace: stack traceback:
Data/Scripts/ErrorReporting.lua:28: in function <Data/Scripts/ErrorReporting.lua:20>
[C]: in function '__index'
Data/Scripts/UI/StartMenu.lua:159: in function 'onMOTDTaskFinished'
Data/Scripts/UI/StartMenu.lua:24: in function <Data/Scripts/UI/StartMenu.lua:24>
Error Type: lua
While investigating this error, I noticed two identical sections of code
which retrieved the MOTD test file.
I refactored the code to have only one section of code retrieve the file,
and I checked the error condition from opening the test file. When the
test file is not found, the code returns a null string.
Added 1 commit:
8bc1e6c4- Refactored test file code and fixed error.Status changed to merged
mentioned in commit
8135502e68