diff --git a/EonaCat.Logger/EonaCat.Logger.csproj b/EonaCat.Logger/EonaCat.Logger.csproj
index 748eee2..727b90c 100644
--- a/EonaCat.Logger/EonaCat.Logger.csproj
+++ b/EonaCat.Logger/EonaCat.Logger.csproj
@@ -3,7 +3,7 @@
.netstandard2.1; net6.0; net7.0; net8.0; net4.8;
icon.ico
latest
- 1.2.8
+ 1.2.9
EonaCat (Jeroen Saey)
true
EonaCat (Jeroen Saey)
@@ -24,7 +24,7 @@
- 1.2.8+{chash:10}.{c:ymd}
+ 1.2.9+{chash:10}.{c:ymd}
true
true
v[0-9]*
diff --git a/EonaCat.Logger/Extensions/ExceptionExtensions.cs b/EonaCat.Logger/Extensions/ExceptionExtensions.cs
index 7fedc30..8f4090e 100644
--- a/EonaCat.Logger/Extensions/ExceptionExtensions.cs
+++ b/EonaCat.Logger/Extensions/ExceptionExtensions.cs
@@ -14,8 +14,14 @@ public static class ExceptionExtensions
var st = new StackTrace(exception, true);
var frame = st.GetFrame(0);
- var fileLine = frame.GetFileLineNumber();
- var filename = frame.GetFileName();
+ int fileLine = -1;
+ string filename = "Unknown";
+
+ if (frame != null)
+ {
+ fileLine = frame.GetFileLineNumber();
+ filename = frame.GetFileName();
+ }
var sb = new StringBuilder();