Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8232757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:56:09+00:00 2026-06-07T17:56:09+00:00

When I use Closure Compiler I get the following errors when compiling in advanced

  • 0

When I use Closure Compiler I get the following errors when compiling in advanced mode: (in simple- and Whitespace only mode the code gets not problems at all)

JSC_REDECLARED_VARIABLE: Redeclared variable: e at line 31 character 9
} catch (e) {
         ^
JSC_REDECLARED_VARIABLE: Redeclared variable: e at line 34 character 9
} catch (e) {
         ^

The code described by Closure Compiler as an error is the following:

function getXMLHttp() {
    var xmlHttp;
    try {
        xmlHttp = new XMLHttpRequest();
    } catch (e) {
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
                return false;
            }
        }
    }
    return xmlHttp;
}

Why this problem occurs when I use Advanced mode, I don’t know. I have no idea why the compiler says this is an error as well.

(Quick note: This code is just a simple XMLrequest for an PHP file in a error catch handling for handling IE. All my JavaScript code works as it should be.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:56:12+00:00Added an answer on June 7, 2026 at 5:56 pm

    You can easily get rid of it by using e, e2 and e3 for your exceptions. That’s dirty but still a good workaround.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When use the Google Closure Compiler advanced optimizations on the following code: function add(v1,
I'm trying to use the Google Closure Compiler to split my application code based
I'm using Closure Compiler , when compiling my scripts I spend the following: Before
Dear folks, Closure Compiler gives this warnings in Advanced Mode, underlining {this. JSC_USED_GLOBAL_THIS: dangerous
In Google Closure Compiler I get the warning WARNING - dangerous use of the
i use the http://closure-compiler.appspot.com/home to compress my code. MY JS File * EDIT: *
EBay's VJET and Google's Closure Compiler both use type annotations in Javascript comments. Why
I'm trying to get Code Closure to work, but unfortunately, there's always an error
Any ideas on how to use Google Closure Compiler to combine multiple JavaScript files
I want to use the google closure compiler on the javascript source we're using.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.