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

Signaling of fatal/blocking errors #40

Closed
hdietze opened this issue Jun 18, 2015 · 7 comments · Fixed by #133 or #140
Closed

Signaling of fatal/blocking errors #40

hdietze opened this issue Jun 18, 2015 · 7 comments · Fixed by #133 or #140

Comments

@hdietze
Copy link
Contributor

hdietze commented Jun 18, 2015

While experimenting with the reasoner command/operation. I noticed that the method just silently returns (and maybe event writes the result to a file) in case of an inconsistent ontology. There is no change in exit code (command-line level) or Java return value to indicate that there was an fatal problem.

In general we need an agreed up on mechanism to signal an error for a command (should we really use exceptions for this?). This should also result in a non-normal exit code for the command-line.

@jamesaoverton
Copy link
Member

I agree that we need to fix the exit codes.

I think that Operations should throw exceptions, and not just exit. This is important for testing failures.

The Commands can probably just exit on problems. I've tried to make each Command work by itself (each one can be called directly from its main method) and work inside a CommandManager. If we want to maintain that system, then we have to decide on that interaction.

@cmungall
Copy link
Contributor

I suggest an IncoherentOntologyException, for cases when the ontology has either unsatisfiable classes, or is inconsistent

@cmungall
Copy link
Contributor

cmungall commented Jan 6, 2017

Did something change with logging? We don't seem to do info-level logging any more.

Now the unsats are completely unvisible unless you run with -vv

@cmungall
Copy link
Contributor

cmungall commented Jan 6, 2017

Ah, nothing changed. It's just a difference between materialize and reason commands. The former uses log.error (which I think is appropriate) rather than info.

It also exits if unsat

@cmungall
Copy link
Contributor

cmungall commented Jan 6, 2017

Additional quibble with the reporting in reason. It will say "There are N unsatisfiable classes in the ontology.", where N includes owl:Nothing

@jamesaoverton
Copy link
Member

I changed the default level to ERROR to prevent all the noise from the other libraries: #107

What would be better?

@cmungall
Copy link
Contributor

cmungall commented Jan 6, 2017

That's fine I think

I'm working on exceptions at the moment

cmungall added a commit that referenced this issue Jan 6, 2017
Includes incoherent OPs in logical tests, fixes #104

Note these two tickets are coupled, so were tackled together.

To handle validation checks a new ReasonerHelper class was created.

This implements

 - inconsistency
 - incoherent TBox (ie unsat classes)
 - incoherent RBox (using probe classes)

Exceptions are thrown on encountering any of these.

Currently there is no way to allow the user to ignore exceptions;
this could in theory be added but would likely be a very bady idea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants