This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Add PHP 5.5 finally keyword support | ||
---|---|---|---|
Product: | php | Reporter: | Fleshgrinder |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | mmolda |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Fleshgrinder
2013-10-03 17:30:09 UTC
*** This bug has been marked as a duplicate of bug 230677 *** Sorry, have to reopen this one because it's not entirely working as it should. https://wiki.php.net/rfc/finally <?php $db = mysqli_connect(); try { call_some_function($db);//the function may throw exceptions which we can not handle } finally { mysqli_close($db); } The above code is valid but marked as invalid in NetBeans (trunk). I wasn't able to test the following: <?php try { return 2; } finally { echo "this will be called\n"; } //this will never be called echo "you can not see me"; As it's directly marked as error by NetBeans (trunk), but it might be marked as "unreachable code" because of the return, that's something that shouldn't happen (if it happens). Kindest regards You have to open project properties and switch to use PHP 5.5 version. And don't change meta info, thanks. If you see some issue (the second use case), file a new one. But not sure what you try to tell me, that unreachable statement hint doesn't work with a finally kw? Yep, it's possible. But as I said, it's another issue. Thanks. I changed the project to PHP 5.5, still the following is marked as error: try {} finally {} This isn't: try {} catch {} finally {} Shall I open another issue for this as well? Yes, P3 defect, thanks. Fixed in issue #236865. Verified. Thanks. Product Version: NetBeans IDE Dev (Build 201310170001) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) |