Skip to content

Commit 5af0750

Browse files
committed
Rename SyntaxError to SyntaxErrorException
1 parent 4a96716 commit 5af0750

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

projects/client/RabbitMQ.Client/src/client/exceptions/SyntaxError.cs renamed to projects/client/RabbitMQ.Client/src/client/exceptions/SyntaxErrorException.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ namespace RabbitMQ.Client.Exceptions
4444
{
4545
/// <summary> Thrown when our peer sends a frame that contains
4646
/// illegal values for one or more fields. </summary>
47-
public class SyntaxError : HardProtocolException
47+
public class SyntaxErrorException : HardProtocolException
4848
{
49-
public SyntaxError(string message) : base(message)
49+
public SyntaxErrorException(string message) : base(message)
5050
{
5151
}
5252

projects/client/RabbitMQ.Client/src/client/impl/WireFormatting.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static decimal AmqpToDecimal(byte scale, uint unsignedMantissa)
5555
{
5656
if (scale > 28)
5757
{
58-
throw new SyntaxError($"Unrepresentable AMQP decimal table field: scale={scale}");
58+
throw new SyntaxErrorException($"Unrepresentable AMQP decimal table field: scale={scale}");
5959
}
6060

6161
return new decimal(
@@ -173,7 +173,7 @@ public static object ReadFieldValue(ReadOnlyMemory<byte> memory, out int bytesRe
173173
case 'V':
174174
return null;
175175
default:
176-
throw new SyntaxError($"Unrecognised type in table: {(char)memory.Span[0]}");
176+
throw new SyntaxErrorException($"Unrecognised type in table: {(char)memory.Span[0]}");
177177
}
178178
}
179179

@@ -182,7 +182,7 @@ public static byte[] ReadLongstr(ReadOnlyMemory<byte> memory)
182182
int byteCount = (int)NetworkOrderDeserializer.ReadUInt32(memory);
183183
if (byteCount > int.MaxValue)
184184
{
185-
throw new SyntaxError($"Long string too long; byte length={byteCount}, max={int.MaxValue}");
185+
throw new SyntaxErrorException($"Long string too long; byte length={byteCount}, max={int.MaxValue}");
186186
}
187187

188188
return memory.Slice(4, byteCount).ToArray();

0 commit comments

Comments
 (0)