[TYPO3-core] RFC: #9318: Enhance and fix tslib_eidtools

Dmitry Dulepov [typo3] dmitry at typo3.org
Sat Sep 13 15:47:36 CEST 2008


Hi!

Martin Kutschker wrote:
> In this case it would be better not to call $TYPO3_DB->connectDB()
> directly, but use the underlying public function $TYPO3_DB->sql_pconnect().
> 
> Die'ing in a library function sucks!
> 
> Alternatively I'm open to change $TYPO3_DB->connectDB() so that it takes
> a parameter telling it not to die on error. Instead of dying it could
> either report FALSE, return an error message or throw an exception.
> 
> Anyway for tslb_eidttools I think a die with an error message is not the
> right choice as it might be used in an AJAX or other non HTML contexts.

Well... That function did not declare any return value before, so any existing scripts will continue to ignore its result. But I agree your approach is better than existing. Here is the update.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9318_v3.diff
Type: text/x-diff
Size: 5818 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080913/900ec3aa/attachment.diff 


More information about the TYPO3-team-core mailing list