bug #30784 [Translator] Add resource path to exception message for schema valida… (jschaedl)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30784).
Discussion
----------
[Translator] Add resource path to exception message for schema valida…
…tion errors
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30762
| License | MIT
Commits
-------
3ce7f5a5f9
[Translator] Add resource path to exception message for schema validation errors
This commit is contained in:
commit
c7c1c3bad9
@ -58,7 +58,7 @@ class XliffFileLoader implements LoaderInterface
|
||||
|
||||
$xliffVersion = XliffUtils::getVersionNumber($dom);
|
||||
if ($errors = XliffUtils::validateSchema($dom)) {
|
||||
throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $xliffVersion, XliffUtils::getErrorsAsString($errors)));
|
||||
throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $resource, XliffUtils::getErrorsAsString($errors)));
|
||||
}
|
||||
|
||||
if ('1.2' === $xliffVersion) {
|
||||
|
Reference in New Issue
Block a user