Problem/Motivation

On continuous jobs...

  • JobItem::addTranslatedData() calls JobItem::needsReview()
  • JobItem::needsReview() calls JobItem::acceptTranslation() wrapped in a try/catch block
  • While JobItem::acceptTranslation() can throw exceptions, is also able to fail softly by returning FALSE. But the caller doesn't account for this scenario and nothing logged

This makes us lose valuable information about the failure.

Proposed resolution

The callers should also treat the case when JobItem::acceptTranslation() fails softly by returning FALSE

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork tmgmt-3580841

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Working on this

claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Ready for review

Side note: I see there's also Job::acceptTranslation() but that's weird as is used only in tests. Didn't touch it

huzooka’s picture

Status: Needs review » Reviewed & tested by the community

Changes are clear and obvious.
I mark this RTBC, hoping to get some feedback from maintainers in regard of the API changes.

  • claudiu.cristea committed 629a611d on 8.x-1.x
    fix: #3580841 Callers don't account the scenario in which JobItem::...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for review. Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.