[icinga-checkins] icinga.org: icingaweb2/feature/translation-catalog-object-13012: CatalogEntry: Change exceptions

git at icinga.org git at icinga.org
Fri Nov 25 08:43:14 CET 2016


Module: icingaweb2
Branch: feature/translation-catalog-object-13012
Commit: 5ca827525bbd05cab3592a62149efb0fc898c744
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=5ca827525bbd05cab3592a62149efb0fc898c744

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Fri Nov 25 08:39:32 2016 +0100

CatalogEntry: Change exceptions

---

 modules/translation/library/Translation/Catalog/CatalogEntry.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/translation/library/Translation/Catalog/CatalogEntry.php b/modules/translation/library/Translation/Catalog/CatalogEntry.php
index 9308638..a180cc9 100644
--- a/modules/translation/library/Translation/Catalog/CatalogEntry.php
+++ b/modules/translation/library/Translation/Catalog/CatalogEntry.php
@@ -4,8 +4,8 @@
 namespace Icinga\Module\Translation\Catalog;
 
 use Exception;
-use InvalidArgumentException;
 use Icinga\Exception\IcingaException;
+use Icinga\Module\Translation\Exceptions\CatalogEntryException;
 
 /**
  * Class CatalogEntry
@@ -135,12 +135,12 @@ class CatalogEntry
      *
      * @return  CatalogEntry
      *
-     * @throws  InvalidArgumentException
+     * @throws  CatalogEntryException
      */
     public static function fromArray(array $entry)
     {
         if (! isset($entry['msgid']) || ! isset($entry['msgstr'][0])) {
-            throw new InvalidArgumentException('Message id and a message are required to create a catalog entry');
+            throw new CatalogEntryException('Missing msgid or msgstr');
         }
 
         $catalogEntry = new static(



More information about the icinga-checkins mailing list