Open
Description
Each page should be able to have its own error()
function alongside go
and do
.
The same goes for the _common
page.
Then there should be individual files in page/_error
:
- 404.html // a special 404 page
- 404.php // special logic to execute for the 404
- @errorCode.html // any unhandled error will show this
- @errorCode.php // any unhandled error will be picked up here
- _common.php // handle logic for all errors here
Then we'll be able to have the following scenario:
- As a developer
- When I request an Entity in my page logic's
go
function likefunction go(ShopItem $item)
- And the
ShopItem
is loaded in theServiceLoader
according to theDynamicPath
- But there is no matching
ShopItem
for the currentDynamicPath
- Then the
ServiceLoader
throws aShopItemNotFoundException
- And the page logic's
error(Throwable $reason)
function is called - And the generic
page/_error/@errorCode.html
is displayed