exceptio-ruby 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/exceptio/client.rb +2 -2
- data/lib/exceptio/hooks.rb +2 -2
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -28,7 +28,7 @@ For Rails 2.3 and Rails 3 apps, exceptions should now automatically track. They
|
|
28
28
|
|
29
29
|
If you are using something other than Rails, or have additional areas outside of the controllers that you want to track exceptions for, you can make a call to log an exception directly:
|
30
30
|
|
31
|
-
ExceptIO::Client.log @exception, "environment", params_hash, session_hash
|
31
|
+
ExceptIO::Client.log @exception, "environment", params_hash, session_hash, "http://request/url"
|
32
32
|
|
33
33
|
Everything besides the exception itself is optional, with the environment defaulting to "production" if not supplied.
|
34
34
|
|
data/lib/exceptio/client.rb
CHANGED
@@ -24,9 +24,9 @@ module ExceptIO
|
|
24
24
|
@configured = false
|
25
25
|
end
|
26
26
|
|
27
|
-
def self.log(exception, environment = "production", params = {}, session = {})
|
27
|
+
def self.log(exception, environment = "production", params = {}, session = {}, request_url = nil)
|
28
28
|
return false unless @configured
|
29
|
-
res = self.post("/applications/#{@application}/errors", {:query => {:app_key => @app_key}, :body => {:error => {:message => exception.message, :backtrace => exception.backtrace, :environment => environment, :params => params, :session => session}}})
|
29
|
+
res = self.post("/applications/#{@application}/errors", {:query => {:app_key => @app_key}, :body => {:error => {:message => exception.message, :backtrace => exception.backtrace, :environment => environment, :params => params, :session => session, :request_url => request_url}}})
|
30
30
|
res.code == 201
|
31
31
|
end
|
32
32
|
end
|
data/lib/exceptio/hooks.rb
CHANGED
@@ -2,13 +2,13 @@ module ExceptIO
|
|
2
2
|
module Hooks
|
3
3
|
module Rails23
|
4
4
|
def log_error(exception)
|
5
|
-
ExceptIO::Client.log(exception, Rails.env, params, session)
|
5
|
+
ExceptIO::Client.log(exception, Rails.env, params, session, request.url)
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
9
|
module Rails3
|
10
10
|
def rescue_to_exceptio(exception = nil)
|
11
|
-
ExceptIO::Client.log(exception, Rails.env, params, session)
|
11
|
+
ExceptIO::Client.log(exception, Rails.env, params, session, request.url)
|
12
12
|
raise exception
|
13
13
|
end
|
14
14
|
|