sub catches all haskell exception