mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +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.
|
// Display the error message, or a generic stub if there is no error message.
|
||||||
if (data.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 {
|
} else {
|
||||||
alert("AJAX communication error while requesting " + params.module + "." + params.act);
|
alert("AJAX communication error while requesting " + params.module + "." + params.act);
|
||||||
}
|
}
|
||||||
|
|
@ -237,7 +241,11 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (data.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 {
|
} else {
|
||||||
alert("AJAX communication error while requesting " + request_info);
|
alert("AJAX communication error while requesting " + request_info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,18 @@ class messageView extends message
|
||||||
Context::set('system_message_detail', nl2br($detail));
|
Context::set('system_message_detail', nl2br($detail));
|
||||||
Context::set('system_message_location', escape($location));
|
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');
|
$this->setTemplateFile('system_message');
|
||||||
|
|
||||||
// Default 403 Error
|
// Default 403 Error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue