Commit c74676f0 authored by Jon Skeet's avatar Jon Skeet

Report serialization errors in conformance tests

parent 888e71bd
...@@ -105,6 +105,8 @@ namespace Google.Protobuf.Conformance ...@@ -105,6 +105,8 @@ namespace Google.Protobuf.Conformance
{ {
return new ConformanceResponse { ParseError = e.Message }; return new ConformanceResponse { ParseError = e.Message };
} }
try
{
switch (request.RequestedOutputFormat) switch (request.RequestedOutputFormat)
{ {
case global::Conformance.WireFormat.JSON: case global::Conformance.WireFormat.JSON:
...@@ -116,6 +118,11 @@ namespace Google.Protobuf.Conformance ...@@ -116,6 +118,11 @@ namespace Google.Protobuf.Conformance
throw new Exception("Unsupported request output format: " + request.PayloadCase); throw new Exception("Unsupported request output format: " + request.PayloadCase);
} }
} }
catch (InvalidOperationException e)
{
return new ConformanceResponse { SerializeError = e.Message };
}
}
private static int? ReadInt32(BinaryReader input) private static int? ReadInt32(BinaryReader input)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment