Commit 4815e4873a57353b9d489dba89a2f23982bd4204
1 parent
dd1b2e8f
Exists in
master
and in
1 other branch
Rescue all exceptions during create_issue and display error message in flash[:error]
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
app/controllers/errs_controller.rb
... | ... | @@ -41,7 +41,7 @@ class ErrsController < ApplicationController |
41 | 41 | if @app.issue_tracker |
42 | 42 | begin |
43 | 43 | @app.issue_tracker.create_issue @problem, current_user |
44 | - rescue IssueTrackers::IssueTrackerError => ex | |
44 | + rescue Exception => ex | |
45 | 45 | flash[:error] = ex.message |
46 | 46 | end |
47 | 47 | else | ... | ... |
config/initializers/issue_trackers.rb
1 | -# Include nested issue tracker models | |
2 | -include IssueTrackers | |
3 | - | |
4 | 1 | # Require all issue tracker apis in lib/issue_tracker_apis |
5 | 2 | Dir.glob(Rails.root.join('lib/issue_trackers/apis/*.rb')).each {|t| require t } |
6 | 3 | # Require issue tracker error classes |
7 | 4 | require Rails.root.join('lib/issue_trackers/errors') |
5 | + | |
6 | +# Include nested issue tracker models | |
7 | +include IssueTrackers | ... | ... |