Skip to content

Commit

Permalink
Merge pull request #4921 from Unity-Technologies/fix-permission-timers
Browse files Browse the repository at this point in the history
Use more generic exception catching
  • Loading branch information
awjuliani authored Feb 8, 2021
2 parents b136878 + 787403e commit 0fbb195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ and this project adheres to
- Removed unnecessary memory allocations in `SideChannelManager.GetSideChannelMessage()` (#4886)
- Removed several memory allocations that happened during inference. On a test scene, this
reduced the amount of memory allocated by approximately 25%. (#4887)
- Properly catch permission errors when writing timer files. (#4921)

#### ml-agents / ml-agents-envs / gym-unity (Python)
- Fixed a bug that would cause an exception when `RunOptions` was deserialized via `pickle`. (#4842)
Expand Down
4 changes: 2 additions & 2 deletions com.unity.ml-agents/Runtime/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ public void SaveJsonTimers(string filename = null)
SaveJsonTimers(fs);
fs.Close();
}
catch (IOException)
catch (SystemException)
{
// It's possible we don't have write access to the directory.
// We may not have write access to the directory.
Debug.LogWarning($"Unable to save timers to file {filename}");
}
#endif
Expand Down

0 comments on commit 0fbb195

Please sign in to comment.