Class Qpid::Proton::Condition
In: lib/core/condition.rb
Parent: ProtonError

An AMQP error condition.

An error sent across an AMQP connection has a name, description and optional extra info. The {Connectin}, {Session} and {Link} endpoint classes all have a condition method to check for errors.

{Condition} can also be raised as an exception.

Methods

==   convert   inspect   new   to_s  

Attributes

description  [R] 
info  [R] 
name  [R] 

Public Class methods

Convert an object to a condition. @param obj the object to turn into a condition @param default_name name to use if obj does not imply a name @return [Condition] Conversion depends on the type of obj

  • Condition: return obj
  • Exception: return Condition(obj.class.name, obj.to_s)
  • String-like: return String.try_convert(obj)
  • nil: return nil

@raise ::ArgumentError if obj is not convertible to {Condition}

Public Instance methods

[Validate]