Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
17d4cac2
Commit
17d4cac2
authored
May 31, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue encoding error on controller level
parent
a719bfc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+4
-0
app/views/errors/encoding.html.haml
app/views/errors/encoding.html.haml
+6
-0
No files found.
app/controllers/application_controller.rb
View file @
17d4cac2
...
...
@@ -9,6 +9,10 @@ class ApplicationController < ActionController::Base
render
"errors/gitolite"
,
:layout
=>
"error"
end
rescue_from
Encoding
::
CompatibilityError
do
|
exception
|
render
"errors/encoding"
,
:layout
=>
"error"
,
:status
=>
404
end
rescue_from
ActiveRecord
::
RecordNotFound
do
|
exception
|
render
"errors/not_found"
,
:layout
=>
"error"
,
:status
=>
404
end
...
...
app/views/errors/encoding.html.haml
0 → 100644
View file @
17d4cac2
.alert-message.block-message.error
%h3
Encoding Error
%hr
%p
Page cant be loaded cause of encoding error
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment