This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Description
Describe the bug
When executing an Operation which is not supported, a java.lang.UnsupportedOperationException is thrown. This class is unrelated to the uk.gov.gchq.gaffer.operation.OperationException class which is caught by the GafferPopGraph catch clause.
These are the relevant lines:
|
try { |
|
LOGGER.info("GafferPop operation chain called: " + opChain.toString()); |
|
return graph.execute(opChain, user); |
|
} catch (final OperationException e) { |
|
throw new RuntimeException(e); |
|
} |
This means that UnsupportedOperationException is not caught and handled as intended. The handling code could also be improved (e.g. log the error instead of just throwing).
To Reproduce
Steps to reproduce the behaviour:
- Add breakpoint in the above catch.
- Execute an Operation which is not supported by the configured store.
- Catch is not invoked as it should be.
Expected behaviour
All kinds of Exceptions encountered when executing Operation(s) should be handled.
Additional context
The snippet above is not tested. Tests should be added for this to ensure correct behaviour.