mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Use more granular exceptions and error messages in important modules
This commit is contained in:
parent
10c8d11785
commit
08964804be
6 changed files with 13 additions and 13 deletions
|
|
@ -36,7 +36,7 @@ class documentView extends document
|
|||
$oDocumentModel = getModel('document');
|
||||
// Creates an object for displaying the selected document
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
|
||||
if(!$oDocument->isExists()) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
if(!$oDocument->isExists()) throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
// Check permissions
|
||||
if(!$oDocument->isAccessible()) throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
// Information setting module
|
||||
|
|
@ -58,7 +58,7 @@ class documentView extends document
|
|||
{
|
||||
if(!checkCSRF())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\SecurityViolation;
|
||||
}
|
||||
|
||||
$content = Context::get('content');
|
||||
|
|
@ -218,7 +218,7 @@ class documentView extends document
|
|||
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager, FALSE);
|
||||
if(!$oDocument->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
// Check permissions
|
||||
if(!$oDocument->isAccessible())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue