flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Bruin <e...@ixsoftware.nl>
Subject [SDK/FalconJX] rewrite multiple try … catch
Date Mon, 13 Oct 2014 08:07:39 GMT

Would anyone mind if I rewrite a couple of ‘multiple’ try … catch
statements that exist in the SDK (Binding.as and Watcher.as) to a single
try … catch with an ‘internal’ if … then?

I’m trying to cross compile the SDK directly to JS using FalconJX. JS
doesn’t support multiple catch blocks on one try … catch statement, so I
would have to do some heavy lifting in FalconJX to rewrite those. Since
there are only a few of them in the entire SDK, I thought I better spend my
energy on something else and simply rewrite those statements in the SDK to
‘single’ try … catch statements like this:

try {
  // cool code
} catch (e:SpecificError) {
  // handle ‘specific’ error
} catch (e:Error) {
  // handle all other errors


try {
  // cool code
} catch (e:Error) {
  if (e is SpecificError) {
    // handle ‘specific’ error
  } else {
    // handle all other errors

Thoughts? Am I missing something obvious (or less obvious)?


Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message