Hey,

> Am 06.12.2016 um 08:06 schrieb Yasuo Ohgaki <yohg...@ohgaki.net>:
> 
> Hi all,
> 
> *snip*
> 
> * Why it does not use exception for error?
> 
> Session module uses "errors", not "exceptions" basically. Session save
> handler uses "errors" also. We should avoid inconsistency in a module.
> Exception adoption will be addressed and exceptions will be used
> consistent manner by other RFC.

This is not session module specific, your interface is specifying a return 
type. Thus this should be enforced on the interface implementation level. (I.e. 
it will be impossible for an user to define a function not having a return type 
of string/array)

Also, if a wrong argument is passed to a function, it should throw a type 
error. Perhaps old modules from pre-PHP 5 do emit warnings or recoverables, but 
we then shall transition from that to TypeError, and definitely use TypeError 
in new functionality.

Bob

Reply via email to