testdouble/suture

Suture.create :on_{new,old,subject}_error handler

searls opened this issue · 0 comments

Add a custom on-error hook when the new code path fails in production, allowing folks to do something when the code path raises an (unexpected, see: #24 ) error.

on_new_error: -> (name, args, error) { PhonesHome.new.phone(name, args) } 

Its return value doesn't have any kind of impact on what happens next, Suture will propagate the error just as it would have