From f61e9988bec61abf2e8077ccb05ac76816b92d15 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Fri, 12 Jan 2024 12:40:53 +0000 Subject: [PATCH] Update EmbeddedFontLoader.iOS.cs --- src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs b/src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs index 7684de0b325f..6715eaddee3a 100644 --- a/src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs +++ b/src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs @@ -49,7 +49,10 @@ public partial class EmbeddedFontLoader if (uiFont != null) return name; - throw new NSErrorException(error); + if (error != null) + throw new NSErrorException(error); + else + throw new InvalidOperationException("Unable to load font from the stream."); } catch (Exception ex) {