Skip to content

Commit 24a7ace

Browse files
author
Fraser Greenroyd
committed
Add null-handling
1 parent 484f580 commit 24a7ace

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

BHoM_Engine/Compute/RecordEvent.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public static bool RecordEvent(string message, EventType type = EventType.Unknow
5353
[Output("success", "True if the event has been successfully recorded as a BHoM Event.")]
5454
public static bool RecordEvent(Exception exception, string message = "", EventType type = EventType.Unknown)
5555
{
56+
if (exception == null)
57+
return false;
58+
5659
string exceptionMessage = "";
5760

5861
Exception e = exception;

0 commit comments

Comments
 (0)