Commit 63beb458 authored by Dries's avatar Dries

- Patch #313902 by c960657: properly display SimpleTest errors.

parent c2a4b9c1
...@@ -286,17 +286,17 @@ Drupal.getSelection = function (element) { ...@@ -286,17 +286,17 @@ Drupal.getSelection = function (element) {
*/ */
Drupal.ahahError = function(xmlhttp, uri) { Drupal.ahahError = function(xmlhttp, uri) {
if (xmlhttp.status == 200) { if (xmlhttp.status == 200) {
if (jQuery.trim($(xmlhttp.responseText).text())) { if (jQuery.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. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText });
} }
else { else {
var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText }); var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri });
} }
} }
else { 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. \n@uri", {'@uri': uri, '@status': xmlhttp.status });
} }
return message; return message.replace(/\n/g, '<br />');;
} }
// Global Killswitch on the <html> element. // Global Killswitch on the <html> element.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment