Sha256: fb95646108345dd5f29665c21de5c614cd186a0cea4768e388086bb977fe73da

Contents?: true

Size: 521 Bytes

Versions: 16

Compression:

Stored size: 521 Bytes

Contents

require 'json'
require 'timeout'

module Frontkick
  # ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
  class TimeoutLocal < ::Timeout::Error; end
  class Locked < StandardError; end
  class Timeout < StandardError
    attr_reader :pid, :command, :killed

    def initialize(pid, command, killed)
      @pid = pid
      @command = command
      @killed = killed
    end

    def to_s
      {pid: @pid, command: @command, killed: @killed}.to_json
    end

    alias_method :message, :to_s
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
frontkick-0.5.7 lib/frontkick/error.rb
frontkick-0.5.6 lib/frontkick/error.rb
frontkick-0.5.5 lib/frontkick/error.rb
frontkick-0.5.4 lib/frontkick/error.rb
frontkick-0.5.3 lib/frontkick/error.rb
frontkick-0.5.2 lib/frontkick/error.rb
frontkick-0.5.1 lib/frontkick/error.rb
frontkick-0.5.0 lib/frontkick/error.rb
frontkick-0.4.9 lib/frontkick/error.rb
frontkick-0.4.8 lib/frontkick/error.rb
frontkick-0.4.7 lib/frontkick/error.rb
frontkick-0.4.6 lib/frontkick/error.rb
frontkick-0.4.5 lib/frontkick/error.rb
frontkick-0.4.4 lib/frontkick/error.rb
frontkick-0.4.3 lib/frontkick/error.rb
frontkick-0.4.1 lib/frontkick/error.rb