diff options
| author | Loïc CORBASSON <loic.devel@corbasson.fr> | 2026-02-16 17:05:27 +0100 |
|---|---|---|
| committer | Loïc CORBASSON <loic.devel@corbasson.fr> | 2026-02-16 17:23:52 +0100 |
| commit | 893188ab287abe7647d4f0dfd9cbff0f9cf5adcb (patch) | |
| tree | b4ba3be6f0812576cf5d5713ef6841a41e2868fe /Emby.Server.Implementations/Serialization | |
| parent | fc6419685c0b930630c54e33119fdef1180fb8d9 (diff) | |
Add the filename to the exception's trace to facilitate error resolution (see #12254, #9508, ...)
Diffstat (limited to 'Emby.Server.Implementations/Serialization')
| -rw-r--r-- | Emby.Server.Implementations/Serialization/MyXmlSerializer.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Serialization/MyXmlSerializer.cs b/Emby.Server.Implementations/Serialization/MyXmlSerializer.cs index aa5fbbdf73..5c9a94cd36 100644 --- a/Emby.Server.Implementations/Serialization/MyXmlSerializer.cs +++ b/Emby.Server.Implementations/Serialization/MyXmlSerializer.cs @@ -85,9 +85,17 @@ namespace Emby.Server.Implementations.Serialization /// <returns>System.Object.</returns> public object? DeserializeFromFile(Type type, string file) { - using (var stream = File.OpenRead(file)) + try { - return DeserializeFromStream(type, stream); + using (var stream = File.OpenRead(file)) + { + return DeserializeFromStream(type, stream); + } + } + catch (Exception ex) + { + ex.Data.Add("Filename", file); + throw; } } |
