Exception: Analytics::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/analytics/error.rb,
lib/analytics/error/permission_insufficient.rb,
lib/analytics/error/no_access_token_provided.rb

Defined Under Namespace

Classes: NoAccessTokenProvided, PermissionInsufficient

Instance Method Summary collapse

Constructor Details

#initialize(exception = $!, response_headers = {}) ⇒ Error

Returns a new instance of Error.



3
4
5
6
# File 'lib/analytics/error.rb', line 3

def initialize(exception=$!, response_headers={})
  @wrapped_exception = exception
  exception.respond_to?(:backtrace) ? super(exception.message) : super(exception.to_s)
end

Instance Method Details

#backtraceObject



8
9
10
# File 'lib/analytics/error.rb', line 8

def backtrace
  @wrapped_exception.respond_to?(:backtrace) ? @wrapped_exception.backtrace : super
end