This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 399809 - dead code false positive in try catch scenario
Summary: dead code false positive in try catch scenario
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VJET (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Justin Early CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-03 10:54 EST by Justin Early CLA
Modified: 2017-04-11 15:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Early CLA 2013-02-03 10:54:38 EST
function CreateHTTPRequestObject () { 
    var activeX = (window.ActiveXObject && location.protocol === "file:"); 
    if (window.XMLHttpRequest && !activeX) { 
        return new XMLHttpRequest(); 
    } 
    else { 
        try { 
            return new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch(e) {} 
    } 
    alert ("Your browser doesn't support XML handling!"); 
    return null; 
} 


Getting unreachable code warning on these lines: 

alert ("Your browser doesn't support XML handling!"); 
return null;
Comment 1 Justin Early CLA 2013-03-01 11:31:50 EST
Same problem as 401136

*** This bug has been marked as a duplicate of bug 401136 ***
Comment 2 Justin Early CLA 2013-03-01 12:50:19 EST
not a duplicate try catch is different than for loop case. try catch case has been fixed.