README.rdoc in pboling-super_exception_notifier-1.6.8 vs README.rdoc in pboling-super_exception_notifier-1.7.0

- old
+ new

@@ -54,20 +54,20 @@ mkdir -p ~/src cd ~/src git clone git://github.com/pboling/exception_notification.git cd exception_notification gem build exception_notification.gemspec - sudo gem install super_exception_notification-1.6.8.gem # (Or whatever version gets built) + sudo gem install super_exception_notification-1.7.0.gem # (Or whatever version gets built) Then cd to your rails app to optionally freeze the gem into your app: rake gems:freeze GEM=super_exception_notifier Then in your environment.rb: config.gem 'super_exception_notifier', - :version => '~> 1.6.8', + :version => '~> 1.7.0', :lib => "exception_notifier" Installing Gem from Github's Gem Server: @@ -75,11 +75,11 @@ sudo gem install pboling-super_exception_notifier Then in your environment.rb: config.gem 'pboling-super_exception_notifier', - :version => '~> 1.6.9', + :version => '~> 1.7.0', :lib => "exception_notifier", :source => 'http://gems.github.com' Plugin using Git: @@ -168,16 +168,18 @@ "423" => "Locked", "500" => "Internal Server Error", "501" => "Not Implemented", "503" => "Service Unavailable" } + # error_layout: # can be defined at controller level to the name of the desired error layout, # or set to true to render the controller's own default layout, # or set to false to render errors with no layout # syntax is the same as the rails 'layout' method (which is to say a string) self.error_layout = nil + # Rails error classes to rescue and how to rescue them (which error code to use) self.rails_error_classes = { # These are standard errors in rails / ruby NameError => "503", TypeError => "503", @@ -190,10 +192,11 @@ CorruptData => "422", NoMethodError => "500", NotImplemented => "501", MethodDisabled => "200" } + # Highly dependent on the verison of rails, so we're very protective about these' self.rails_error_classes.merge!({ ActionView::TemplateError => "500"}) if defined?(ActionView) && ActionView.const_defined?(:TemplateError) self.rails_error_classes.merge!({ ActiveRecord::RecordNotFound => "400" }) if defined?(ActiveRecord) && ActiveRecord.const_defined?(:RecordNotFound) self.rails_error_classes.merge!({ ActiveResource::ResourceNotFound => "404" }) if defined?(ActiveResource) && ActiveResource.const_defined?(:ResourceNotFound) @@ -203,20 +206,23 @@ self.rails_error_classes.merge!({ ActionController::MethodNotAllowed => "405" }) if ActionController.const_defined?(:MethodNotAllowed) self.rails_error_classes.merge!({ ActionController::UnknownAction => "501" }) if ActionController.const_defined?(:UnknownAction) self.rails_error_classes.merge!({ ActionController::RoutingError => "404" }) if ActionController.const_defined?(:RoutingError) self.rails_error_classes.merge!({ ActionController::InvalidAuthenticityToken => "405" }) if ActionController.const_defined?(:InvalidAuthenticityToken) end + # Verbosity of the gem (true or false) mainly useful for debugging self.exception_notifier_verbose = false + # Do Not Ever send error notification emails for these Error Classes self.silent_exceptions = [] self.silent_exceptions << ActiveRecord::RecordNotFound if defined?(ActiveRecord) - self.silent_exceptions << [ - ActionController::UnknownController, - ActionController::UnknownAction, - ActionController::RoutingError, - ActionController::MethodNotAllowed - ] if defined?(ActionController) + if defined?(ActionController) + self.silent_exceptions << ActionController::UnknownController + self.silent_exceptions << ActionController::UnknownAction + self.silent_exceptions << ActionController::RoutingError + self.silent_exceptions << ActionController::MethodNotAllowed + end + # Notification Level # Web Hooks, even though they are turned on by default, only get used if you actually configure them in the environment (see above) # Email, even though it is turned on by default, only gets used if you actually configure recipients in the environment (see above) self.notification_level = [:render, :email, :web_hooks]