mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
"docu update: which exceptions should give translated messages ready to display to the user and which dont need to"
This commit is contained in:
parent
6994cc27c1
commit
6a91f65335
@ -19,6 +19,10 @@
|
||||
* eGroupWare API - Exceptions
|
||||
*
|
||||
* All eGroupWare exceptions should extended this class, so we are able to eg. add some logging later.
|
||||
*
|
||||
* The messages for most exceptions should be translated and ready to be displayed to the user.
|
||||
* Only exception to this are exceptions like egw_exception_assertion_fails, egw_exception_wrong_parameter
|
||||
* or egw_exception_db, which are suppost to happen only during program development.
|
||||
*/
|
||||
class egw_exception extends Exception
|
||||
{
|
||||
@ -115,17 +119,19 @@ class egw_exception_not_found extends egw_exception
|
||||
/**
|
||||
* An necessary assumption the developer made failed, regular execution can not continue
|
||||
*
|
||||
* As you get this only by an error in the code or during development, the message does not need to be translated
|
||||
*/
|
||||
class egw_exception_assertion_failed extends egw_exception { }
|
||||
|
||||
/**
|
||||
* A method or function was called with a wrong or missing parameter
|
||||
*
|
||||
* As you get this only by an error in the code or during development, the message does not need to be translated
|
||||
*/
|
||||
class egw_exception_wrong_parameter extends egw_exception_assertion_failed { }
|
||||
|
||||
/**
|
||||
* Wrong or missing required user input
|
||||
* Wrong or missing required user input: message should be translated so it can be shown directly to the user
|
||||
*
|
||||
*/
|
||||
class egw_exception_wrong_userinput extends egw_exception_assertion_failed { }
|
||||
|
Loading…
Reference in New Issue
Block a user