-
Notifications
You must be signed in to change notification settings - Fork 99
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
Expose exceptions #539
Expose exceptions #539
Conversation
Codecov Report
@@ Coverage Diff @@
## master #539 +/- ##
============================================
- Coverage 81.04% 81.02% -0.03%
+ Complexity 2088 2085 -3
============================================
Files 149 149
Lines 7306 7293 -13
Branches 895 895
============================================
- Hits 5921 5909 -12
+ Misses 1116 1115 -1
Partials 269 269
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a sensible move, thanks! But the diff seems bigger than it needs to be, at a first glance.
} | ||
|
||
return results; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a large piece of code that got reformatted in the process, it's not clear to me what changed there?
I am sorry for the large diff. As I have said in #535, there are no coding standards. Most code seems to use tabs. Eclipse doesn't work so well with mixed indentation. I have therefore converted spaces in affected code to tabs. Some code has indentation changes, because try/catch was removed. GitHub fortunately allows you to hide whitespace changes. I am touching only three classes that are relevant in lexeme I/O. This is all a preparation for #403. Of these classes, I should clarify that this is not really a breaking change as long as WDTK correctly parses entities returned from Wikibase API. New exceptions are thrown only if parsing fails, which would imply a bug in WDTK. All code using |
Per #530, but only for three important classes:
JsonSerializer
,WbGetEntitiesAction
, andWbSearchEntitiesAction
. There are some spurious exception handlers in dumpfiles/rdf that I have not touched in this pull request.Calling code within WDTK itself already assumes exceptions. There were no null checks anywhere, so this actually fixes a bug.
This is a breaking change but a very visible one, so there would be no silent failures in apps.