Sha256: 562ec1c88863e558c15fce0c34a74817254de60cb7b69a070457616a56824150
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
knjrbfw-0.0.8 | lib/knj/tests/test_retry.rb |
knjrbfw-0.0.7 | lib/knj/tests/test_retry.rb |
knjrbfw-0.0.4 | lib/knj/tests/test_retry.rb |
knjrbfw-0.0.3 | lib/knj/tests/test_retry.rb |