From 796fe82e44a0b95ef14d114db391543f8718d192 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 18 Sep 2023 16:10:45 +0200 Subject: [PATCH] [GL] Handle and log exceptions when writing shader cache --- src/Aardvark.Rendering.GL/Resources/Program.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Aardvark.Rendering.GL/Resources/Program.fs b/src/Aardvark.Rendering.GL/Resources/Program.fs index 52f7d3f5..c89843ca 100644 --- a/src/Aardvark.Rendering.GL/Resources/Program.fs +++ b/src/Aardvark.Rendering.GL/Resources/Program.fs @@ -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)