wrangler 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/TODO +4 -0
- data/lib/wrangler/exception_handler.rb +33 -0
- data/wrangler.gemspec +2 -2
- metadata +4 -4
data/TODO
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
This is a collection of things that could/should be worked on:
|
2
2
|
|
3
|
+
== Interaction with other libs:
|
4
|
+
* make compatible with newer versions of delayed_job...but maintain
|
5
|
+
compatibility with the send_later() version.
|
6
|
+
|
3
7
|
== Robustness:
|
4
8
|
* in wrangler.rb : render_error_template(), if we fail to find a template for the
|
5
9
|
exception/status code, we just log that fact right now. this is probably worth
|
@@ -359,6 +359,39 @@ module Wrangler
|
|
359
359
|
if render_errors
|
360
360
|
render_error_template(exception, status_code)
|
361
361
|
end
|
362
|
+
|
363
|
+
rescue Exception => unhandled_exception
|
364
|
+
# if it looks like a temporary error interacting with SMTP, then enqueue
|
365
|
+
# the error using delayed job if possible
|
366
|
+
# (testing by name this way in case the exception isn't loaded into
|
367
|
+
# environment, which would cause a NameError and be counterproductive...)
|
368
|
+
if unhandled_exception.class.name == 'Net::SMTPAuthenticationError' &&
|
369
|
+
Wrangler::ExceptionNotifier.respond_to?(:send_later)
|
370
|
+
|
371
|
+
log_error "Wrangler failed to send error notification: #{unhandled_exception.class.name}:"
|
372
|
+
log_error " #{unhandled_exception.to_s}"
|
373
|
+
|
374
|
+
# note: this is specific to an old-ish version of delayed job...should
|
375
|
+
# make wrangler compatible with the old and the new...
|
376
|
+
log_error "Wrangler attempting to send via delayed job"
|
377
|
+
Wrangler::ExceptionNotifier.send_later(:deliver_exception_notification,
|
378
|
+
exception_classname,
|
379
|
+
error_string,
|
380
|
+
error_messages,
|
381
|
+
proc_name,
|
382
|
+
backtrace,
|
383
|
+
supplementary_info,
|
384
|
+
status_code,
|
385
|
+
request_data)
|
386
|
+
else
|
387
|
+
log_error "/!\\ FAILSAFE /!\\ Wrangler encountered an unhandled exception " +
|
388
|
+
"while trying to handle an error. The arguments it received " +
|
389
|
+
"were:"
|
390
|
+
log_error " exception: #{exception.inspect}"
|
391
|
+
log_error " options: #{options.inspect}"
|
392
|
+
log_error "The unhandled error encountered was #{unhandled_exception.class.name}:"
|
393
|
+
log_error " #{unhandled_exception.to_s}"
|
394
|
+
end
|
362
395
|
end
|
363
396
|
|
364
397
|
|
data/wrangler.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wrangler}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.25"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Percival"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-21}
|
13
13
|
s.description = %q{A gem for handling exceptions thrown inside your Rails app. If you include the
|
14
14
|
gem in your application controller, wrangler will render the error pages you
|
15
15
|
configure for each exception or HTTP error code. It will also handle notifying
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrangler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 41
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 25
|
10
|
+
version: 0.1.25
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Percival
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-21 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|