Return a more descriptive error when module class is not found

This commit is contained in:
Kijin Sung 2021-04-26 15:42:30 +09:00
parent 3a4fb82666
commit 32621dd34e
3 changed files with 10 additions and 0 deletions

View file

@ -402,6 +402,10 @@ class ModuleHandler extends Handler
{
$oModule = $class_fullname::getInstance();
}
else
{
return self::_createErrorMessage(-1, 'msg_module_class_not_found', 404);
}
}
elseif($type == "view" && $this->is_mobile && Context::isInstalled())
{
@ -514,6 +518,10 @@ class ModuleHandler extends Handler
{
$oModule = $class_fullname::getInstance();
}
else
{
return self::_createErrorMessage(-1, 'msg_module_class_not_found', 404);
}
}
elseif($type == "view" && $this->is_mobile)
{

View file

@ -249,6 +249,7 @@ $lang->msg_invalid_format = 'Invalid Format';
$lang->msg_not_permitted_act = 'You do not have permission to execute requested action.';
$lang->msg_module_is_not_exists = 'Cannot find the page you requested. Ask your Site Admin to check the page.';
$lang->msg_module_is_not_standalone = 'Requested page cannot be executed independently.';
$lang->msg_module_class_not_found = 'Cannot find class to handle the requested action.';
$lang->msg_empty_search_target = 'Cannot find the Search target.';
$lang->msg_empty_search_keyword = 'Cannot find the Keyword.';
$lang->msg_empty_content = 'The content is empty.';

View file

@ -251,6 +251,7 @@ $lang->msg_invalid_format = '잘못된 형식입니다.';
$lang->msg_not_permitted_act = '요청한 기능을 실행할 수 있는 권한이 없습니다.';
$lang->msg_module_is_not_exists = '요청한 페이지를 찾을 수 없습니다. 사이트 관리자에게 문의해 주세요.';
$lang->msg_module_is_not_standalone = '요청한 페이지는 독립적으로 동작할 수 없습니다.';
$lang->msg_module_class_not_found = '요청한 페이지를 처리할 클래스를 찾을 수 없습니다.';
$lang->msg_empty_search_target = '검색대상이 없습니다.';
$lang->msg_empty_search_keyword = '검색어가 없습니다.';
$lang->msg_empty_content = '내용이 없습니다.';