Exception: Houston::Notification::APNSError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Houston::Notification::APNSError
- Defined in:
- lib/houston/notification.rb
Constant Summary collapse
- CODES =
{ 0 => "No errors encountered", 1 => "Processing error", 2 => "Missing device token", 3 => "Missing topic", 4 => "Missing payload", 5 => "Invalid token size", 6 => "Invalid topic size", 7 => "Invalid payload size", 8 => "Invalid token", 10 => "Shutdown", 255 => "Unknown error" }
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ APNSError
constructor
A new instance of APNSError.
Constructor Details
#initialize(code) ⇒ APNSError
Returns a new instance of APNSError.
23 24 25 26 27 |
# File 'lib/houston/notification.rb', line 23 def initialize(code) raise ArgumentError unless CODES.include?(code) super(CODES[code]) @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
21 22 23 |
# File 'lib/houston/notification.rb', line 21 def code @code end |