[GHC] #8886: sync-all: END actions result in confusing error message

GHC ghc-devs at haskell.org
Sun Jun 22 20:36:21 UTC 2014


#8886: sync-all: END actions result in confusing error message
-------------------------------+-------------------------------------------
        Reporter:  fw          |            Owner:  hvr
            Type:  bug         |           Status:  patch
        Priority:  normal      |        Milestone:
       Component:  Trac & Git  |          Version:
      Resolution:              |         Keywords:  sync-all
Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple             |       Difficulty:  Easy (less than 1 hour)
 Type of failure:              |       Blocked By:
  None/Unknown                 |  Related Tickets:
       Test Case:              |
        Blocking:              |
-------------------------------+-------------------------------------------

Comment (by fw):

 Replying to [comment:7 thomie]:
 > Ok, you're right that changing the directory is not needed.
 >
 > But one thing I don't understand: why are those checks in the `END`
 block, if not for running even on an error. Wouldn't they be better placed
 straight in the main function then?

 Probably, I don't understand they way the script is written.  I have seen
 some Perl in my day, and this usage of `BEGIN` (for argument parsing, of
 all) and `END` blocks seemed highly suspect to me.  I didn't want to audit
 the code for any forms of non-local control flow, so I put in just the
 exception check as a minimal, less risky change.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8886#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list