Skip to content

Introduce a new method to validate schema that throws#77

Merged
JuliaSamartseva merged 3 commits intomainfrom
wff
Mar 6, 2025
Merged

Introduce a new method to validate schema that throws#77
JuliaSamartseva merged 3 commits intomainfrom
wff

Conversation

@JuliaSamartseva
Copy link
Collaborator

No description provided.

@garanj
Copy link
Collaborator

garanj commented Mar 4, 2025

Maybe bump the version in build.gradle?

@JuliaSamartseva JuliaSamartseva changed the title Introduce a new method to validate schema that throws in case schema can't be created Introduce a new method to validate schema that throws Mar 6, 2025
public boolean validateOrThrow(Document xmlDocument, String version)
throws WatchFaceFormatValidationException {
if (!isSupportedVersion(version)) {
Log.e("Validator not support the version #" + version);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log.e("Validator does not support version #" + version);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

resourceManager.getXsdFile(version).getCanonicalPath(), new DOMSource(xmlDocument));
return true;
} catch (SAXException | IOException e) {
Log.e(e.getMessage());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log.e("Could not validate xml", e);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@JuliaSamartseva JuliaSamartseva merged commit 1b4ed2d into main Mar 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants