Sha256: 32b80188b6a9897bd04ab10a0cd5e4b51c098dc68c77ec96ebe16b97f60439b1
Contents?: true
Size: 533 Bytes
Versions: 50
Compression:
Stored size: 533 Bytes
Contents
#!/usr/bin/env ruby Dir.chdir(File.dirname(__FILE__)) require "../autoload" count = 0 result = Knj::Retry.try( :exit => false, :interrupt => true, :errors => [Knj::Errors::NotFound, RuntimeError], :timeout => 1, :tries => 3, :return_error => true ) do count += 1 print "Count: #{count.to_s}\n" if count <= 2 exit end if count <= 3 #raise "Test" end end #print "Error 1 was a #{result[0][:error].class.to_s} with the message: #{result[0][:error].message.to_s}\n" Knj::Php.print_r(result)
Version data entries
50 entries across 50 versions & 1 rubygems