forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNpgsqlSafeReadException.cs
More file actions
23 lines (22 loc) · 990 Bytes
/
NpgsqlSafeReadException.cs
File metadata and controls
23 lines (22 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
namespace Npgsql.TypeHandling
{
/// <summary>
/// Can be thrown by readers to indicate that interpreting the value failed, but the value was read wholly
/// and it is safe to continue reading. Any other exception is assumed to leave the buffer in an unknown position,
/// losing protocol sync and therefore setting the connector to state Broken.
/// Note that an inner exception is mandatory, and will get thrown to the user instead of the NpgsqlSafeReadException.
/// </summary>
public class NpgsqlSafeReadException : Exception
{
/// <summary>
/// Creates an instance of <see cref="NpgsqlSafeReadException"/>.
/// </summary>
/// <param name="innerException"></param>
public NpgsqlSafeReadException(Exception innerException) : base((string)"", innerException)
{
if (innerException == null)
throw new ArgumentNullException(nameof(innerException));
}
}
}