Hey:

On Sat, May 16, 2015 at 1:41 AM, Dan Ackroyd <dan...@basereality.com> wrote:
> On 15 May 2015 at 17:12, Xinchen Hui <larue...@gmail.com> wrote:
>>> How would that work when people want to write unit/integration tests
>>> to test the behaviour of a module when an EngineException is thrown?
>>>
>>> If you can't create a certain type of exception, it would mean that
>>> some code is basically untestable...which seems bad.
>> You can not creat it directly, but you can trigger the engine to throw one
>>
>
> I don't think having to do something like:
>
> eval("<?php echo bar(};");
>
> to test ParseExceptions is a good plan.
>
> Can you say what the actual problem is that would be solved by not
> allowing them to be initialized from userland? It seems an artificial
> limitation that just makes it harder to test programs.
EngineException/TypeException/ParserException is designed for internal
errors only.

if then are used in user land. they may cause lots of side affects,
this bug is one of them...

thanks
>
> cheers
> Dan



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to