JavaScript try-catch bug?

Ran across a seemingly bad bug either in Rhino or JavaScript language spec - haven’t had a chance to dig into. But this pattern appears to let an exception raised in func() leak thru the surrounding try block:

  function foo()
  {
    try { return func(); }
    catch (err) { ... }
  }

I was able to work around by assigning to a local variable:

  function foo()
  {
    try { var x = func(); return x; }
    catch (err) { ... }
  }

Did a short Google on this, but nothing obvious turned up.

3 Responses to “JavaScript try-catch bug?”

  1. ALFONSO says:


    Pillspot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Low price pills. Buy drugs online

    Buy:Female Cialis.Female Pink Viagra.Prozac.Zetia.Lasix.Lipothin.Wellbutrin SR.Zocor.Lipitor.Cozaar.Aricept.Ventolin.Nymphomax.Acomplia.Buspar.Amoxicillin.SleepWell.Advair.Seroquel.Benicar….

  2. ALBERT says:


    Medicamentspot.com. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. Low price pills. Buy drugs online

    Buy:Human Growth Hormone.Zyban.100% Pure Okinawan Coral Calcium.Zovirax.Valtrex.Prednisolone.Arimidex.Actos.Lumigan.Retin-A.Synthroid.Mega Hoodia.Nexium.Accutane.Petcam (Metacam) Oral Suspension.Prevacid….