Exception: Crabfarm::CrawlerBaseError

Inherits:
ApiError show all
Defined in:
lib/crabfarm/errors.rb

Direct Known Subclasses

CrawlerError

Instance Method Summary collapse

Methods inherited from ApiError

#code

Constructor Details

#initialize(_msg, _trace) ⇒ CrawlerBaseError

Returns a new instance of CrawlerBaseError.



40
41
42
43
# File 'lib/crabfarm/errors.rb', line 40

def initialize(_msg, _trace)
  @exc = _msg
  @trace = _trace
end

Instance Method Details

#to_jsonObject



45
46
47
48
49
50
# File 'lib/crabfarm/errors.rb', line 45

def to_json
  {
    exception: @exc,
    backtrace: @trace
  }.to_json
end