aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2015-08-25 14:32:28 +0100
committerGravatar Jon Skeet <jonskeet@google.com>2015-08-25 14:32:28 +0100
commitca89a1a118c98d107421d40c4513e5aefdd2c3e3 (patch)
tree8c4310bebb4a01ea859f439f850df3ec49079534 /csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
parent3253634dcb2cbd5917d10aebc1a18a7692b237a3 (diff)
Change where we rename Descriptor.cs to DescriptorProtoFile.cs.
We now do this in protoc instead of the generation simpler. Benefits: - Generation script is simpler - Detection is simpler as we now only need to care about one filename - The embedded descriptor knows itself as "google/protobuf/descriptor.proto" avoiding dependency issues This PR also makes the "invalid dependency" exception clearer in terms of expected and actual dependencies.
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
index bad58faa..45862aff 100644
--- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
@@ -300,8 +300,9 @@ namespace Google.Protobuf.Reflection
if (dependencies[i].Name != proto.Dependency[i])
{
throw new DescriptorValidationException(result,
- "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
- "those listed in the FileDescriptorProto.");
+ "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
+ "those listed in the FileDescriptorProto. Expected: " +
+ proto.Dependency[i] + " but was: " + dependencies[i].Name);
}
}