fucking_fail 0.0.2 → 0.0.3
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/lib/fucking_fail.rb +4 -2
- metadata +1 -1
data/lib/fucking_fail.rb
CHANGED
@@ -7,7 +7,9 @@ class FuckingFail
|
|
7
7
|
DEFAULT_ON_ERROR = [ 500, {'Content-Type' => 'text/plain'}, [] ]
|
8
8
|
|
9
9
|
def self.formatted_error error
|
10
|
-
error.class.name + ': ' + error.message
|
10
|
+
formatted = error.class.name + ': ' + error.message.to_s
|
11
|
+
formatted << "\n" + error.backtrace.join("\n") if error.backtrace
|
12
|
+
formatted
|
11
13
|
end
|
12
14
|
|
13
15
|
def self.env_variable
|
@@ -65,7 +67,7 @@ class FuckingFail
|
|
65
67
|
end
|
66
68
|
|
67
69
|
def deliver exception, additional_data
|
68
|
-
uri = URI.parse
|
70
|
+
uri = URI.parse post_url
|
69
71
|
params = additional_data.merge :token => token, :stacktrace => FuckingFail.formatted_error(exception)
|
70
72
|
Net::HTTP.post_form uri, params
|
71
73
|
end
|