Skip to content

Commit 2cb17b4

Browse files
committed
Use nameof in SqliteValue
1 parent 639f5de commit 2cb17b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SQLiteSharp/SQLiteRaw.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ private SqliteValue(byte[]? @blob) {
312312
SqliteType.Blob => AsBlob is null,
313313
SqliteType.Null or _ => true,
314314
};
315-
public long CastInteger => AsInteger ?? throw new NullReferenceException("SqliteValue was null");
316-
public double CastFloat => AsFloat ?? throw new NullReferenceException("SqliteValue was null");
317-
public string CastText => AsText ?? throw new NullReferenceException("SqliteValue was null");
318-
public byte[] CastBlob => AsBlob ?? throw new NullReferenceException("SqliteValue was null");
315+
public long CastInteger => AsInteger ?? throw new NullReferenceException($"{nameof(SqliteValue)} was null");
316+
public double CastFloat => AsFloat ?? throw new NullReferenceException($"{nameof(SqliteValue)} was null");
317+
public string CastText => AsText ?? throw new NullReferenceException($"{nameof(SqliteValue)} was null");
318+
public byte[] CastBlob => AsBlob ?? throw new NullReferenceException($"{nameof(SqliteValue)} was null");
319319

320320
public static implicit operator SqliteValue(long? value) => new(value);
321321
public static implicit operator SqliteValue(double? value) => new(value);

0 commit comments

Comments
 (0)