class Catcher
  def self.catch
    yield
  end
end

class NoOp
  def self.catch
  end
end

def try
  yield
  NoOp
rescue
  Catcher
end


try{ p :ok }.catch{ p :fail }
try{ something }.catch{ p :fail }
