From b2220764e9601de9a0f9028e42f04f9a43d004e1 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 10 Sep 2012 19:59:12 +0000 Subject: [PATCH] add a default 500 http error handling with jquery git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383092 13f79535-47bb-0310-9956-ffa450edef68 --- .../resources/org/apache/archiva/i18n/default.properties | 1 + .../archiva-webapp-js/src/main/webapp/js/archiva/startup.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index 7d8d27cf2..a317d1826 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -38,6 +38,7 @@ directory=Directory save.all=Save all authz.karma.needed=You need to be authenticated for this action or have more privileges. +error.500=An error has happened you must contact the administrator to check the logs. administration.repositories=Repositories Administration diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js index 79dc190bc..ae2ce0582 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js @@ -35,6 +35,12 @@ function() { removeMediumSpinnerImg("#main-content"); clearUserMessages(); displayErrorMessage($.i18n.prop('authz.karma.needed')); + }, + 500: function(){ + removeSmallSpinnerImg(); + removeMediumSpinnerImg("#main-content"); + clearUserMessages(); + displayErrorMessage($.i18n.prop('error.500')); } } }); -- 2.39.5