WordPress / WordPress/php-toolkit

Exception handling when running steps

Open
#65 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Architecture enhancement
Dominant language
PHP
Stars
61
Forks
21
Avg merge
19h 34m
Merged PRs (30d)
7

Description

Most methods executed by step runners can raise a exceptions. Until now this was handled within those methods, but it has proven itself to be quite cumbersome. It's quite easy to forget to properly wrap a method invocation with a try-catch and thus allowing for an issue in a single step to fail a whole blueprint. Also - that's quite a boilerplate-heavy solution.

As a potential solution - exceptions would be handled in the orchestrating BlueprintRunner.php, thus "globally" protecting the execution flow, with no need for extra boilerplate and no risk of exception-leakage.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading BlueprintRunner.php and tracing how step-runner methods are invoked. Determine the expected behavior when a step raises an exception, including whether the blueprint should continue, then confirm that handling is centralized rather than repeated in each step method. No test file is named in the issue, so the completion criteria need clarification.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.