Exception: Ksef::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ksef/errors.rb

Overview

Base class for everything this gem raises. Rescue this to catch all of it.

#problem carries the parsed KSeF error body when the error came from an API response, and is nil for locally-raised errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, problem: nil) ⇒ Error

Returns a new instance of Error.



17
18
19
20
# File 'lib/ksef/errors.rb', line 17

def initialize(message = nil, problem: nil)
  @problem = problem
  super(message)
end

Instance Attribute Details

#problemKsef::ProblemDetails? (readonly)

Returns:



15
16
17
# File 'lib/ksef/errors.rb', line 15

def problem
  @problem
end