summaryrefslogtreecommitdiff
path: root/misc/drupal.js
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-03 07:35:37 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-03 07:35:37 +0000
commitac5e86e05cf4647a9ecf37d6978fa04ed1b89e24 (patch)
tree5ab4624edcf915267c3cf8171b609521e3e3e72a /misc/drupal.js
parentcdb326fc741b77ec2ba2699baec6f7770b6b02b1 (diff)
downloadbrdo-ac5e86e05cf4647a9ecf37d6978fa04ed1b89e24.tar.gz
brdo-ac5e86e05cf4647a9ecf37d6978fa04ed1b89e24.tar.bz2
- Patch #329015 by Damien Tournoud: improved error handling of batch API.
Diffstat (limited to 'misc/drupal.js')
-rw-r--r--misc/drupal.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index cb650ac65..e71adda75 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -296,16 +296,16 @@ Drupal.getSelection = function (element) {
* Build an error message from ahah response.
*/
Drupal.ahahError = function (xmlhttp, uri) {
- if (xmlhttp.status == 200) {
+ if (xmlhttp.status == 200 || (xmlhttp.status == 500 && xmlhttp.statusText == 'Service unavailable (with message)')) {
if ($.trim(xmlhttp.responseText)) {
- var message = Drupal.t('An error occurred. \n@uri\n@text', { '@uri': uri, '@text': xmlhttp.responseText });
+ var message = Drupal.t("An error occurred. \nPath: @uri\nMessage: !text", { '@uri': uri, '!text': xmlhttp.responseText });
}
else {
- var message = Drupal.t('An error occurred. \n@uri\n(no information available).', { '@uri': uri });
+ var message = Drupal.t("An error occurred. \nPath: @uri\n(no information available).", {'@uri': uri });
}
}
else {
- var message = Drupal.t('An HTTP error @status occurred. \n@uri', { '@uri': uri, '@status': xmlhttp.status });
+ var message = Drupal.t("An HTTP error @status occurred. \nPath: @uri", { '@uri': uri, '@status': xmlhttp.status });
}
return message.replace(/\n/g, '<br />');
};