Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rack parameters

  • Loading branch information...
commit ebc4a7b0f86027f5941da3c506298976d825d8c4 1 parent 6bcdd81
@wal wal authored
View
6 install.rb
@@ -1,6 +1,6 @@
# This is the post install hook for when Exceptional is installed as a plugin.
-require 'ftools'
-
+require 'fileutils'
+
# puts IO.read(File.join(File.dirname(__FILE__), 'README'))
config_file = File.expand_path("#{File.dirname(__FILE__)}/../../../config/exceptional.yml")
@@ -15,5 +15,5 @@
puts "For exceptional to work you need to configure your API key."
puts " See #{example_config_file}"
puts "If you don't have an API key, get one at http://getexceptional.com/."
- File.copy example_config_file, config_file
+ FileUtils.copy example_config_file, config_file
end
View
4 lib/exceptional/controller_exception_data.rb
@@ -12,13 +12,13 @@ def framework
"rails"
end
- def extra_stuff
+ def extra_stuff
return {} if @request.nil?
{
'request' => {
'url' => (@request.respond_to?(:url) ? @request.url : "#{@request.protocol}#{@request.host}#{@request.request_uri}"),
'controller' => @controller.class.to_s,
- 'action' => @request.parameters['action'],
+ 'action' => (@request.respond_to?(:parameters) ? @request.parameters['action'] : @request.params['action']),
'parameters' => filter_paramaters(@request.respond_to?(:parameters) ? @request.parameters : @request.params),
'request_method' => @request.request_method.to_s,
'remote_ip' => (@request.respond_to?(:remote_ip) ? @request.remote_ip : @request.ip),
View
4 lib/exceptional/exception_data.rb
@@ -39,7 +39,9 @@ def to_json
begin
require 'json'
return to_hash.to_json
- rescue StandardError
+ rescue StandardError => e
+ Exceptional.logger.error(e.message)
+ Exceptional.logger.error(e.backtrace)
raise StandardError.new("You need a json gem/library installed to send errors to Exceptional (Object.to_json not defined). \nInstall json_pure, yajl-ruby, json-jruby, or the c-based json gem")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.