Thanks to visit codestin.com
Credit goes to github.com

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

GafferPopGraph execute method doesn't catch certain exceptions #3125

@GCHQDeveloper314

Description

@GCHQDeveloper314

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:

  1. Add breakpoint in the above catch.
  2. Execute an Operation which is not supported by the configured store.
  3. 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.

Metadata

Metadata

Assignees

Labels

bugConfirmed or suspected bugtinkerpopSpecific to/touches the tinkerpop module

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions