While working on definition-interop implementation, I found 2 places where exceptions could potentially be triggered:
DefinitionProviderInterface might send back objects that are not one of the valid definitions (for instance, it might return a stdClass. In this case, we might want to throw a InvalidDefinition exception.
- while passing arguments to a definition, arguments passed could also be invalid (for instance, we could pass a
stdClass to the MethodCall::addArgument method, which is invalid too. In this case, we might want to throw a InvalidArgument exception.
These could be simple empty interfaces:
interface DefinitionException {
}
interface InvalidDefinition extends DefinitionException {
}
interface InvalidArgument extends DefinitionException {
}
Shall I write a PR for this?
If yes, I'll also have to modify the unit test to test for these interfaces.
Also, what about the naming? Sall I suffix those with "Exception"? Or even worse, with ExceptionInterface? :) ... mmmm.... suffixes :)
While working on definition-interop implementation, I found 2 places where exceptions could potentially be triggered:
DefinitionProviderInterfacemight send back objects that are not one of the valid definitions (for instance, it might return astdClass. In this case, we might want to throw aInvalidDefinitionexception.stdClassto theMethodCall::addArgumentmethod, which is invalid too. In this case, we might want to throw aInvalidArgumentexception.These could be simple empty interfaces:
Shall I write a PR for this?
If yes, I'll also have to modify the unit test to test for these interfaces.
Also, what about the naming? Sall I suffix those with "Exception"? Or even worse, with ExceptionInterface? :) ... mmmm.... suffixes :)