failbot 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/failbot.rb +31 -28
  3. data/lib/failbot/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bf1cd8e88ccca089754a6f50a95eee082d6c539
4
- data.tar.gz: 1effc1524d589bf0ec7fef6c889d25e6370d3bbf
3
+ metadata.gz: 590764333f8092a3f705fe2d4a31aa1698e93ea4
4
+ data.tar.gz: b5442b2100651a2a3bc496844125d2f9292fe393
5
5
  SHA512:
6
- metadata.gz: b2d57f92ffc7d22d628585737b7237e9e205ac00227ab933c16a0e285079e57de3dfbd2a23423b10bfb37fbaa5531b113b598c270296d572f0e8afdffe429b58
7
- data.tar.gz: 5c462f2056572ce7a66cd220179f220f86a0794ae1d0e9f800108f52898262da0919aa175e14935a527a2b5137be5067beb2ac74a3f5dde55770925522fb35a9
6
+ metadata.gz: 1d80897bbe2ddb19976999f58359bfa64996bc024d104ee5b3892198ddd1d09ad1d47ac2e7fd23b88d467b2e8fc8efc30bd6f65efc55160637a9ea4f1e5cc628
7
+ data.tar.gz: 20c82ffce7e74252f0565a86cf916e406d0551ca99cf991cd3060bf31a1e73d78a3b7efb1c6cc9a7d5b46456d60c2fc8d122ce3355339bf87a4ac636b64b8672
data/lib/failbot.rb CHANGED
@@ -210,41 +210,44 @@ module Failbot
210
210
 
211
211
  def report!(e, other = {})
212
212
  return unless @report_errors
213
- data = squash_contexts(context, exception_info(e), other)
214
-
215
- if !data.has_key?("rollup")
216
- data = data.merge("rollup" => @rollup.call(e, data))
217
- end
218
-
219
- if @before_report
220
- data = squash_contexts(data, @before_report.call(e, data))
221
- end
222
-
223
- if @app_override
224
- data = data.merge("app" => @app_override)
225
- end
226
-
227
- data = sanitize(data)
228
213
 
229
214
  if already_reporting
230
- logger.warn "FAILBOT: asked to report while reporting! #{data.inspect}" rescue nil
215
+ logger.warn "FAILBOT: asked to report while reporting!" rescue nil
231
216
  logger.warn e.message rescue nil
232
217
  logger.warn e.backtrace.join("\n") rescue nil
233
218
  return
234
219
  end
235
-
236
220
  self.already_reporting = true
237
- backend.report(data)
238
- instrument("report.failbot", data)
239
- rescue Object => i
240
- # don't fail for any reason
241
- logger.debug "FAILBOT: #{data.inspect}" rescue nil
242
- logger.debug e.message rescue nil
243
- logger.debug e.backtrace.join("\n") rescue nil
244
- logger.debug i.message rescue nil
245
- logger.debug i.backtrace.join("\n") rescue nil
246
- ensure
247
- self.already_reporting = false
221
+
222
+ begin
223
+ data = squash_contexts(context, exception_info(e), other)
224
+
225
+ if !data.has_key?("rollup")
226
+ data = data.merge("rollup" => @rollup.call(e, data))
227
+ end
228
+
229
+ if @before_report
230
+ data = squash_contexts(data, @before_report.call(e, data))
231
+ end
232
+
233
+ if @app_override
234
+ data = data.merge("app" => @app_override)
235
+ end
236
+
237
+ data = sanitize(data)
238
+
239
+ backend.report(data)
240
+ instrument("report.failbot", data)
241
+ rescue Object => i
242
+ # don't fail for any reason
243
+ logger.debug "FAILBOT: #{data.inspect}" rescue nil
244
+ logger.debug e.message rescue nil
245
+ logger.debug e.backtrace.join("\n") rescue nil
246
+ logger.debug i.message rescue nil
247
+ logger.debug i.backtrace.join("\n") rescue nil
248
+ ensure
249
+ self.already_reporting = false
250
+ end
248
251
  end
249
252
 
250
253
  # Public: Disable exception reporting. This is equivalent to calling
@@ -1,3 +1,3 @@
1
1
  module Failbot
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: failbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@rtomayko"
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-01-06 00:00:00.000000000 Z
13
+ date: 2016-06-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yajl-ruby
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: 1.3.6
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5.1
110
+ rubygems_version: 2.2.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Deliver exceptions to Haystack