Skip to content

Commit

Permalink
CLIENT-2797: Allowing inner Exception to be null in AerospikeExceptio…
Browse files Browse the repository at this point in the history
…n constructor

Several AerospikeException.Timeout constructors take an optional null inner exception and use this constructor.

Right now, using these AerospikeException.Timeout constructors will result in an "Object reference not set to an instance of an object" error if no inner exception is given.
  • Loading branch information
m-wilmo authored Feb 23, 2024
1 parent 38ba28c commit 0709485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AerospikeClient/Main/AerospikeException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public AerospikeException(int resultCode, string message, Exception inner = null
}

public AerospikeException(int resultCode, Exception e)
: base(e.Message, e)
: base(e?.Message ?? string.Empty, e)
{
this.resultCode = resultCode;
}
Expand Down

0 comments on commit 0709485

Please sign in to comment.