aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-17 11:42:25 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-17 11:45:36 +0200
commit2d77050b049a1c51eef40af8a51fa82a4e16f782 (patch)
treea357a9341ead28660637296f80512dabafe2b6dc /server
parentcbd911bcb1bc40510fdf56639ef7476612bec24c (diff)
downloadsonarqube-2d77050b049a1c51eef40af8a51fa82a4e16f782.tar.gz
sonarqube-2d77050b049a1c51eef40af8a51fa82a4e16f782.zip
SONAR-5691 Exception messages are shown twice
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
index 7e07115ce41..b00d9d524d6 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
@@ -235,11 +235,11 @@ class ApplicationController < ActionController::Base
def java_error_message(exception)
message = ''
- message += (exception.getMessage ? exception.getMessage : Api::Utils.message(exception.l10nKey, :params => exception.l10nParams.to_a)) if exception.getMessage or exception.l10nKey
has_errors = exception.java_kind_of?(Java::OrgSonarServerExceptions::BadRequestException) && !exception.errors.isEmpty()
- message += '<br/>' unless message.blank? or !has_errors
if has_errors
message += exception.errors().messages().to_a.map{|msg| Api::Utils.message(msg.getKey(), :params => msg.getParams().to_a)}.join('<br/>')
+ else
+ message += (exception.getMessage ? exception.getMessage : Api::Utils.message(exception.l10nKey, :params => exception.l10nParams.to_a)) if exception.getMessage || exception.l10nKey
end
message
end