Skip to content

Conversation

@arteymix
Copy link
Member

@arteymix arteymix commented Jun 21, 2022

All log.error have been switched to log.warn. I also removed the debug enabled check, since SLF4J can do lazy to-string with parametrized logging.

I introduced the following exception hierarchy:

OntologySearchException (generic, includes the queryString)
└ OntologySearchJenaException (where the cause is a JenaException)
  └ RetryWithoutWildcardFailedException (two JenaException as causes: original and last attempt)

Callers should always handle OntologySearchException which is not necessarily Jena-related. If it is, there are more specialized exception types.

All exceptions include the query string used to perform the search. I try to be careful and never log the query itself because it can be pretty big if many clauses are used. If you need to render the query, just catch the exception and print it somewhere, preferably safely.

@arteymix arteymix changed the base branch from development to master June 21, 2022 20:24
@arteymix arteymix self-assigned this Jun 21, 2022
@arteymix arteymix added this to the 1.1.3 milestone Jun 21, 2022
@arteymix arteymix force-pushed the hotfix-1.1.3 branch 2 times, most recently from ac3ecaf to 71d248e Compare June 21, 2022 21:21
@arteymix arteymix force-pushed the hotfix-1.1.3 branch 2 times, most recently from 583cf6b to ad9cf21 Compare June 21, 2022 21:26
* Exception raised when retrying a search without a wildcard still fails.
* @author poirigui
*/
public class RetryWithoutWildcardFailedException extends OntologySearchJenaException {
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe just RetryFailedException would be more appropriate as a name? I'm sure there's more than one way to retry a query.

@arteymix arteymix merged commit 40b9ae7 into master Jul 6, 2022
@arteymix arteymix deleted the hotfix-1.1.3 branch July 6, 2022 21:54
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.

3 participants