Skip to content

Commit

Permalink
[GL] Handle and log exceptions when writing shader cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Sep 18, 2023
1 parent 3826928 commit 796fe82
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Aardvark.Rendering.GL/Resources/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,12 @@ module ProgramExtensions =
code = code.code
modes = prog.SupportedModes
}
File.writeAllBytes file entry

try
File.writeAllBytes file entry
with
| exn ->
Log.warn "[GL] Failed to write to shader program file cache '%s': %s" file exn.Message

#if PICKLERTEST
let test = shaderPickler.UnPickle (File.readAllBytes file)
Expand Down

0 comments on commit 796fe82

Please sign in to comment.