TempReposBN / VirtualMaze

0 stars 8 forks source link

Add exception handling #24

Closed xavierpok closed 1 year ago

xavierpok commented 1 year ago

Add exception handling to ScreenSaver#ProcessSession

ProcessSession calls ScreenSaver#EnqueueData, which can throw an Exception when it runs into an error in file format regarding misaligned triggers, namely Unaligned session and eyedata! Are there missing triggers in eyelink or Unity data?.

This PR handles this Exception by wrapping EnqueueData in a try-catch block, stopping the coroutine & logging the above warning if the exception occurs.

Also, the program will check for if the generation actually completed or interrupted, printing a message to VirtualMazeBatchLog.txt if it was interrupted. See below for an example.

In practice, this will mean the application will exit (slightly more) gracefully when it runs into trigger errors in the dataset.

image