Skip to content
  • Iustin Pop's avatar
    Switch to new-style exception handling · 30d25dd8
    Iustin Pop authored
    
    
    Currently, we're using Prelude.catch to handle I/O errors in
    htools. This style of error handling has been deprecated for a while,
    but it still used to work without warnings.
    
    However, the GHC release 7.4 has started to emit deprecation warnings
    for it, so we change to the Control.Exception module; the code is a
    bit less clean since we only care about I/O errors (but
    Control.Exception deals with other error types too), so we have to
    filter the exceptions.
    
    Note that the new style exception handling is not really "new"; it has
    existed since at least GHC 6.12, which is our oldest supported
    compiler.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
    30d25dd8