Skip to content

Why does TimeoutHandler get to throw Exception? #397

@Palmr

Description

@Palmr

TimeoutHandler::onTimeout throws a checked exception if the implementation is unable to handle the timeout.

BatchEventProcessor::notifyTimeout catches Throwable, so no need for checked exception type.

The exception gets passed to the exception handler which may handle or bail out of the BatchEventProcessor::processEvents depending on the ExceptionHandler implementation.

This is leaning towards use of exceptions for control flow and perhaps we could look at returning something useful from TimeoutHandler::onTimeout instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions