Re: Exception handling

new topic     » goto parent     » topic index » view thread      » older message » newer message

As I was waiting for the bus this morning I was wondering how I'd write my JS code without try/catch. It was an interesting gedanken. One place where it would be pretty hard to avoid is where my JS code, running under C# via ClearScript is connected to Selenium. Occasionally, the connection dies without warning. I can catch the death by something like

function isHeDead(driver) { 
  try { 
    var url = driver.Url; 
    return false; 
  catch (E) { 
    return true; 
  } 
} 

Now this is all dotnet, something that AFAICT Euphoria and Phix aren't addressing, and so the connection technology doesn't have an analogue. But I do wonder if such things can happen in OE/P where something dies that's can't be detected without the test itself terminating the process.

In any case, I'm not pushing for OE to have try/catch. I'll create the track as targeting Euphoria generally and then hand it over to the OE maintainers to bless or butcher as they see fit.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu