Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  Tweak the code to avoid fabbot false positives
  • Loading branch information
fabpot committed Apr 12, 2020
2 parents 99b8317 + 9d5ca86 commit 73df1f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Loader/JsonFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected function loadResource($resource)
$messages = json_decode($data, true);

if (0 < $errorCode = json_last_error()) {
throw new InvalidResourceException(sprintf('Error parsing JSON - %s.', $this->getJSONErrorMessage($errorCode)));
throw new InvalidResourceException('Error parsing JSON: '.$this->getJSONErrorMessage($errorCode));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Loader/XliffFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private function extract($resource, MessageCatalogue $catalogue, string $domain)
try {
$dom = XmlUtils::loadFile($resource);
} catch (\InvalidArgumentException $e) {
throw new InvalidResourceException(sprintf('Unable to load "%s": %s.', $resource, $e->getMessage()), $e->getCode(), $e);
throw new InvalidResourceException(sprintf('Unable to load "%s": '.$e->getMessage(), $resource), $e->getCode(), $e);
}

$xliffVersion = XliffUtils::getVersionNumber($dom);
Expand Down

0 comments on commit 73df1f6

Please sign in to comment.