Improve gitlab encode method
This commit is contained in:
parent
5ff658a607
commit
f909e25d1b
|
@ -27,7 +27,8 @@ module Gitlab
|
||||||
|
|
||||||
# Prevent app from crash cause of encoding errors
|
# Prevent app from crash cause of encoding errors
|
||||||
rescue
|
rescue
|
||||||
"--broken encoding: #{detect[:encoding]}"
|
encoding = detect ? detect[:encoding] : "unknown"
|
||||||
|
"--broken encoding: #{encoding}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def detect_encoding message
|
def detect_encoding message
|
||||||
|
|
Loading…
Reference in a new issue