mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
AJAX 오류 발생시 ERR_* 코드가 있다면 표시 (e4e252c1b4 보완)
This commit is contained in:
parent
96d6e82d5c
commit
fd8a4ff37d
2 changed files with 22 additions and 2 deletions
|
|
@ -90,7 +90,11 @@
|
|||
}
|
||||
// Display the error message, or a generic stub if there is no error message.
|
||||
if (data.message) {
|
||||
alert(data.message.replace(/\\n/g, "\n"));
|
||||
var full_message = data.message.replace(/\\n/g, "\n");
|
||||
if (data.errorDetail) {
|
||||
full_message += "\n\n" + data.errorDetail;
|
||||
}
|
||||
alert(full_message);
|
||||
} else {
|
||||
alert("AJAX communication error while requesting " + params.module + "." + params.act);
|
||||
}
|
||||
|
|
@ -237,7 +241,11 @@
|
|||
return;
|
||||
} else {
|
||||
if (data.message) {
|
||||
alert(data.message.replace(/\\n/g, "\n"));
|
||||
var full_message = data.message.replace(/\\n/g, "\n");
|
||||
if (data.errorDetail) {
|
||||
full_message += "\n\n" + data.errorDetail;
|
||||
}
|
||||
alert(full_message);
|
||||
} else {
|
||||
alert("AJAX communication error while requesting " + request_info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,18 @@ class messageView extends message
|
|||
Context::set('system_message', nl2br($this->getMessage()));
|
||||
Context::set('system_message_detail', nl2br($detail));
|
||||
Context::set('system_message_location', escape($location));
|
||||
|
||||
if ($this->getError())
|
||||
{
|
||||
if ($detail)
|
||||
{
|
||||
$this->add('errorDetail', $detail);
|
||||
}
|
||||
if ($location)
|
||||
{
|
||||
$this->add('errorLocation', $location);
|
||||
}
|
||||
}
|
||||
|
||||
$this->setTemplateFile('system_message');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue