Skip to content

[Feature Idea] Improve Error Handling #37

Closed

Description

@albertalef

Problem: Need a non rescue way to handle of success/failure.

Solution: Add fluent methods to then and catch

sh(meta: true) do
  make!("build").then do |result|
    puts "[✓] make build completed in {result.meta.timestamp}s"
  end.catch do
    puts "[✗] make build failed"
  end.exec

  # Another way
  when_finish = proc { puts "Success" }
  when_fail = proc { puts "Failed" }

  make("build", _then: when_finish, _catch: when_fail)
end

Activity

  1. Repository owner locked and limited conversation to collaborators on Feb 5, 2026
  2. converted this issue into a discussion #56 on Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions