1#[derive(Debug, thiserror::Error)]
2pub(crate) enum ReflectError {
3#[error("Message `{}` not found in files: {}", .0, .1)]
4MessageNotFoundInFiles(String, String),
5#[error("Dependency `{}` of `{}` not found; all deps: {}", .0, .1, .2)]
6DependencyNotFound(String, String, String),
7#[error("Non-unique dependencies given: {}", .0)]
8NonUniqueDependencies(String),
9#[error("Non-unique field name: `{0}`")]
10NonUniqueFieldName(String),
11#[error("Non-unique file descriptor: `{0}`")]
12NonUniqueFileDescriptor(String),
13#[error("Cycle in provided file descriptors")]
14CycleInFileDescriptors,
15#[error("Map entry message name must end with `Entry`")]
16MapEntryNameMustEndWithEntry,
17#[error("Map entry message must have no extensions, nested messages or enums")]
18MapEntryMustHaveNo,
19#[error(
20"Map entry message must have two optional fields, \
21 numbered 1 and 2 and named `key` and `value`"
22)]
23MapEntryIncorrectFields,
24#[error("Could not parse default value for field {0}")]
25CouldNotParseDefaultValueForField(String),
26}