Hi,

Am Samstag, den 13.03.2010, 15:56 -0300 schrieb Marco Túlio Gontijo e
Silva:
> > > I got, in .xsession-errors:
> > > /home/marcot/.xmonad/xmonad-i386-kfreebsdgnu: executeFile: does not exist 
> > > (No such file or directory)

ok, it seems that the error is normal, and it should work. Are you sure
it does not just work :-)

You could check if the attached program outputs:

$ ./catchio 
/does/not/exist: executeFile: does not exist (No such file or directory)
Error caught

Thanks,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  [email protected] | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: [email protected] | http://people.debian.org/~nomeata
import System.IO
import System.Posix.Process (executeFile)
import Prelude hiding ( catch )
import Control.Exception (catch, try, bracket, throw, finally, Exception(ExitException))

catchIO ::  IO () -> IO ()
catchIO f = id (f `catch` \e -> hPrint stderr e >> hFlush stderr)

main = catchIO (executeFile "/does/not/exist" False [] Nothing) >> putStrLn "Error caught"

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to