Comments (2)
In one of the school projects I'm currently doing, errors are handled like this: the execute() method returns an integer (the error code). The main class then checks if the return code is equal to zero. If so, no errors occurred and the display() method can be invoked. If not, the appropriate error message is displayed like this:
switch ($returnCode) {
case ReturnCode::GENERAL_ERROR:
$errorMessage = 'general_error';
break;
...
}
This would be a lot cleaner, since more advanced errors (for example, if you need to specify field names) could be handled by the model itself. If a model method returns an error code, the controller would then check the $errors
array and handle the error and call an error template manually (in the display() method).
Database errors are always fatal, so we wouldn't have to worry about them.
Management panel-related errors would be handled by the management controller, since it uses a different layout.
from draiwiki.
The following management panel sections will be postponed indefinitely:
- Security log
- Server & database settings
- Advanced theme management (will be moved to general settings for the time being)
- Manual (might redirect to the official wiki)
Features that will possibly be postponed as well:
- Maintenance actions
- Bans
The reason that these features are postponed is a lack of time. Besides, most of these are nice to have, but not absolutely required.
from draiwiki.
Related Issues (20)
- Rethink root access implementation HOT 1
- Theme modernization HOT 6
- Move table CSS into its own file
- Test existing features before implementing new ones
- Style preferences for users
- Rethink core functionality implementation (future version) HOT 2
- Getting this error. on fresh installisation. HOT 11
- Security Advisory HOT 1
- Use json_encode for JSON generation HOT 2
- Replace template, skin and image sets with IDs
- Get rid of Google HOT 1
- Management panel no longer displays the page title HOT 1
- Create wrapper function for config class
- Merge index.php and public/index.php
- Custom hash salt is deprecated in PHP 7 HOT 1
- Search page returns incorrect version of articles
- Bytes mutation HOT 5
- Sidebar styling issues HOT 1
- Changes to the way settings are used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draiwiki.