Bug #69929 [Nab]: EngineExceptions broken in alpha 2

From: Date: Thu, 25 Jun 2015 09:00:03 +0000
Subject: Bug #69929 [Nab]: EngineExceptions broken in alpha 2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193875@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69929&edit=1

 ID:                 69929
 User updated by:    cameron dot adam+php at gmail dot com
 Reported by:        cameron dot adam+php at gmail dot com
 Summary:            EngineExceptions broken in alpha 2
 Status:             Not a bug
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Windows 7 64-bit
 PHP Version:        7.0.0alpha1
 Block user comment: N
 Private report:     N

 New Comment:

Gotcha. So what was an EngineException yesterday is a TypeError today (and tested that, and it works
fine). Cheers.

PS: you do not have "alpha 2" as an option in the dropdown when raising a new bug. Forgot
to mention that before.


Previous Comments:
------------------------------------------------------------------------
[2015-06-25 08:39:31] laruence@php.net

sorry for that, but we changed the exception inheritance recently ,please read the "
Changes to error handling" section in: https://github.com/php/php-src/blob/master/UPGRADING

------------------------------------------------------------------------
[2015-06-25 08:16:23] cameron dot adam+php at gmail dot com

Description:
------------
See code.

On alpha 1 this returns "EngineException caught".

On alpha 2 it returns:

Fatal error: Uncaught TypeError: Argument 1 passed to takesInt() must be of the type integer, string
given

I suspect it's something to do with the new Throwable support, at a guess.

This is the first bug I've raised, so lemme know if I've done it wrong,or you need more
info. Cheers.

Test script:
---------------
try {
    function takesInt(int $x){
        return true;
    }

    takesInt('not an int');
} catch(EngineException $e) {
	echo 'EngineException caught<br>';
}



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69929&edit=1


Thread (3 messages)

« previous php.bugs (#193875) next »