-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `log_connection_exception' #22
Comments
Hi, We set up the log_connection_exception method as a method that you can define yourself to do your error reporting. I thought we had put an empty implementation in place, but perhaps not. In any case, the change you made to log the error you were receiving was the sort of thing we imagined people might put in the log_connection_exception method anyway. I'm glad you're finding the plugin useful. |
I think that method should be a class method where it's defined, so that it does nothing by default (instead of erroring by default) - and people can then override the class method if they need to log something. Right now it's an instance method on the app class, but it's called from a class method. |
Good suggestion. Thanks. |
Submitted a pull request changing it to a class method, since I encountered this same issue. ( #27 ) |
I encountered this today (Jan 30th 2012) |
using 0.4.2 gem
try to deliver a notification to apple, but failed, with this error:
undefined method
log_connection_exception' for #<Class:0x6cfbee8> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1994 :in
method_missing_without_paginate'C:/Users/Leonardo Wong/workspace/projectA/vendor/plugins/will_paginate/lib/will_
paginate/finder.rb:170:in
method_missing' c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/app/models/ap n/app.rb:58:in
send_notifications_for_cert'c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/app/models/ap
n/app.rb:26:in
send_notifications' c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/app/models/ap n/app.rb:32:in
send_notifications'c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/app/models/ap
n/app.rb:31:in
each' c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/app/models/ap n/app.rb:31:in
send_notifications'c:/ruby/lib/ruby/gems/1.8/gems/apn_on_rails-0.4.2/lib/apn_on_rails/tasks/apn.rak
e:7
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_c hain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in
synchronize'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_c hain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 c:/ruby/bin/rake:19:in
load'c:/ruby/bin/rake:19
In app.rb, i comment line 58, and put "puts e.message" there, it shows:
259 out of char range
I know my message(alert) is too long, I will fix that, just try to report the code error here.
Thanks for this nice plugin. Save me a lot of time.
The text was updated successfully, but these errors were encountered: