Make Router::getModuleClass throw exceptions

- Add new MethodNotAllowedModule
- Add new Module->determineClass catch blocks
- Update Module and Router tests
This commit is contained in:
Hypolite Petovan 2019-10-11 11:55:02 -04:00
parent bfcae2f79a
commit 4ee9e21a4f
6 changed files with 122 additions and 41 deletions

View file

@ -0,0 +1,15 @@
<?php
namespace Friendica\Module\HTTPException;
use Friendica\BaseModule;
use Friendica\Core\L10n;
use Friendica\Network\HTTPException;
class PageNotFound extends BaseModule
{
public static function content()
{
throw new HTTPException\NotFoundException(L10n::t('Page not found.'));
}
}