class T::Private::Methods::DeclBuilder

def on_failure(*args)

def on_failure(*args)
  check_live!
  if !decl.on_failure.equal?(ARG_NOT_PROVIDED)
    raise BuilderError.new("You can't call .on_failure multiple times in a signature.")
  end
  if decl.checked == :never
    raise BuilderError.new("You can't use .on_failure with .checked(:never) because .on_failure will have no effect.")
  end
  decl.on_failure = args
  self
end