[TYPO3-core] RFC #7357: Use exceptions to detect missing user function

Ingo Renner ingo at typo3.org
Sun Feb 3 22:49:12 CET 2008


Martin Kutschker wrote:

> I thought of a defined set of error codes, like 1 means "db error", 2 
> means "file system problem" etc
> 
> What's the purpose of unique, one-time codes?

you can look them up in a DB - once that is created - or in the wiki 
(again like 5.0), other than that each exception has its unique code and 
thus you can identify which one it is very quick - there will be only 
one place in the source with that specific code.

you can of course say codes X,Y, and Z belong to DB errors, while A,B, 
and C belong to file system errors, and you can always mention (or 
guess) what happened in the error message (first parameter)


Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-team-core mailing list