Show
Ignore:
Timestamp:
09/11/06 13:59:36 (2 years ago)
Author:
audreyt
Message:

* Convert all "catch" in Pugs source code to "catchIO", which

is a re-export of Control.Exception.catch, such that "eval"
can catch asynchronous and imprecise exceptions, e.g. internall
"error" calls during parsing:

eval '"\123"'; # no longer a fatal error

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Match.hs

    r12925 r13182  
    4848    text <- ruleWithAdverbs rule 
    4949    pge  <- liftIO $ evalPGE pwd (encodeUTF8 cs) (encodeUTF8 text) subrules 
    50             `catch` (\e -> return $ ioeGetErrorString e) 
     50            `catchIO` (\e -> return $ show e) 
    5151    rv  <- tryIO Nothing $ fmap Just (readIO $ decodeUTF8 pge) 
    5252    let matchToVal PGE_Fail = VMatch mkMatchFail