Sha256: 372a194119721d3dc38f480af413c0b12cea2bcbda5cfcbea30e57c53bfdbb5a

Contents?: true

Size: 1.49 KB

Versions: 23

Compression:

Stored size: 1.49 KB

Contents

class RbbtException < StandardError; end
class ParameterException < RbbtException; end
class FieldNotFoundError < RbbtException;end
class ClosedStream < RbbtException; end

class ProcessFailed < StandardError; 
  def initialize(pid = Process.pid)
    @pid = pid
    @msg = "Process #{@pid} failed"
    super(@msg)
  end

end

class Aborted < StandardError; end

class TryAgain < StandardError; end

class TryThis < StandardError
  attr_accessor :payload
  def initialize(payload = nil)
    @payload = payload
  end
end

class SemaphoreInterrupted < TryAgain; end
class LockInterrupted < TryAgain; end

class RemoteServerError < RbbtException; end

class DependencyError < Aborted
  def initialize(msg)
    if defined? Step and Step === msg
      step = msg
      new_msg = [step.path, step.messages.last] * ": "
      super(new_msg)
    else
      super(msg)
    end
  end
end

class DependencyRbbtException < RbbtException
  def initialize(msg)
    if defined? Step and Step === msg
      step = msg

      new_msg = nil
      new_msg = [step.path, step.messages.last] * ": "

      super(new_msg)
    else
      super(msg)
    end
  end
end

class DontClose < Exception; end

class KeepLocked < Exception
  attr_accessor :payload
  def initialize(payload)
    @payload = payload
  end
end

class KeepBar < Exception
  attr_accessor :payload
  def initialize(payload)
    @payload = payload
  end
end

class StopInsist < Exception
  attr_accessor :exception
  def initialize(exception)
    @exception = exception
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rbbt-util-5.34.2 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.34.1 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.34.0 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.21 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.20 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.19 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.18 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.17 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.16 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.15 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.14 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.13 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.12 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.11 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.9 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.8 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.7 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.6 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.5 lib/rbbt/util/misc/exceptions.rb
rbbt-util-5.33.4 lib/rbbt/util/misc/exceptions.rb