jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/337805 )
Change subject: ChangeOpDeserializer throws ChangeOpDeserializerException on
invalid input
......................................................................
ChangeOpDeserializer throws ChangeOpDeserializerException on invalid input
ChangeOpException is a RuntimeException individual exception
throw when they cannot apply their changes to the given Entity
(e.g. trying to update a statement which does not exist).
Those kind of issues are different from the case when provided
serialized change request is invalid as in it has a wrong
format/structure. In such cases ChangeOpDeserializer should
be rather throwing ChangeOpDeserializerException which is
a InvalidArgumentException. In such cases ChangeOp would
not even be created, thus ChangeOpException related to the
application of the change is not relevant here.
Change-Id: Ifa22ed7ea2defa017144dbf5969f51ec4177525d
---
M repo/includes/ChangeOp/ChangeOpDeserializer.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Aleksey Bekh-Ivanov (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/ChangeOp/ChangeOpDeserializer.php
b/repo/includes/ChangeOp/ChangeOpDeserializer.php
index 43db839..0935c29 100644
--- a/repo/includes/ChangeOp/ChangeOpDeserializer.php
+++ b/repo/includes/ChangeOp/ChangeOpDeserializer.php
@@ -3,7 +3,7 @@
namespace Wikibase\Repo\ChangeOp;
use Wikibase\ChangeOp\ChangeOp;
-use Wikibase\ChangeOp\ChangeOpException;
+use Wikibase\Repo\ChangeOp\Deserialization\ChangeOpDeserializationException;
/**
* Interface for services that can construct a ChangeOp from a JSON style
array structure describing
@@ -25,7 +25,7 @@
* but may contain additional array keys like "remove" or "add", for
example:
* [ 'label' => [ 'zh' => [ 'remove' ], 'de' => [ 'value' => 'Foo' ] ]
]
*
- * @throws ChangeOpException when the provided array is invalid.
+ * @throws ChangeOpDeserializationException when the provided array is
invalid.
* @return ChangeOp
*
* @see NullChangeOp If no change needs to be applied
--
To view, visit https://gerrit.wikimedia.org/r/337805
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa22ed7ea2defa017144dbf5969f51ec4177525d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek <[email protected]>
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Jakob <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits