errplane 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/errplane/sinatra.rb +8 -6
- data/lib/errplane/version.rb +1 -1
- metadata +1 -1
data/lib/errplane/sinatra.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
Errplane.configure(true) do |config|
|
2
2
|
config.logger ||= ENV['rack.logger']
|
3
|
-
config.rails_environment ||= settings.environment
|
4
|
-
config.application_root ||= settings.root
|
3
|
+
config.rails_environment ||= settings.environment if defined?(settings)
|
4
|
+
config.application_root ||= settings.root if defined?(settings)
|
5
5
|
config.framework = "Sinatra"
|
6
6
|
config.framework_version = ::Sinatra::VERSION
|
7
7
|
end
|
8
8
|
|
9
|
-
error
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
if defined?(error)
|
10
|
+
error do
|
11
|
+
Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env)
|
12
|
+
raise request.env['sinatra.error']
|
13
|
+
end
|
14
|
+
end
|
data/lib/errplane/version.rb
CHANGED