Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE]: tmp: annotate exceptions #94

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filak-sap
Copy link
Contributor

@filak-sap filak-sap commented Apr 15, 2020

@mamiksik @phanak-sap Please, comment in the commit which serves the only purpose to mark exceptions we need to deal with.

See the file exceptions.txt and verify I didn't miss any case.

Then we should go through the exceptions again and classify them by the rules in exceptions.txt

@mamiksik
Copy link
Contributor

I think you did not miss any, however, looking at the code I think it would be good if a custom exception would be raised in method parse at line 159 if a value is None and in method property at line 1 222 when a property is not found.

Also before you pushed this commit I compiled the list of changes for last(closed) PR as requested https://github.com/mamiksik/python-pyodata/wiki/Exception-change-list, but I think there is of little use for it now.

@phanak-sap
Copy link
Contributor

I think it is generally OK. I would like split the "service block" to distinguish somehow "metadata invalid" use case for usage pyodata for example only as metadata validator - therefore logically out of "service" block since there can be no networking at all, only local XML file parsing.

I should be able to distinguish exceptions that came out during the phase "model building/metadata validation" from phase "runtime exception from model from valid/invalid metadata depeding on set policies".

I should have clear subset of exceptions that can be thrown from metadata validation and if none of that is thrown, I consider the metadata valid.

Other possibility is to have really method for only metadata parsing and validation, and not be hidden under client initialization (in use case when I don't really want to use the generated model to access any data)

pyodata.Client('NOT_VALID', None, metadata=local_metadata, config=custom_config)

@mamiksik
Copy link
Contributor

@filak-sap @phanak-sap If there aren't any further objections should I implement the exception as described in this PR?

@CLAassistant
Copy link

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

@phanak-sap phanak-sap marked this pull request as draft March 28, 2022 14:49
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.

None yet

4 participants