diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-09-21 18:28:08 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-09-21 18:28:08 +0000 |
commit | 0198366bba7a5f2d67338633f9eb90889ffc31b2 (patch) | |
tree | 4897d90233b333ee2092e63a4b74c7bcb2d22577 /examples/error.hs | |
parent | d4cb2692f9dae748da23371057a983deca4b2f80 (diff) |
add examples
Diffstat (limited to 'examples/error.hs')
-rw-r--r-- | examples/error.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/error.hs b/examples/error.hs new file mode 100644 index 0000000..bcfe224 --- /dev/null +++ b/examples/error.hs | |||
@@ -0,0 +1,16 @@ | |||
1 | import GSL | ||
2 | import Prelude hiding (catch) | ||
3 | import Control.Exception | ||
4 | |||
5 | test x = catch | ||
6 | (print x) | ||
7 | (\e -> putStrLn $ "captured ["++ show e++"]") | ||
8 | |||
9 | main = do | ||
10 | setErrorHandlerOff | ||
11 | |||
12 | test $ log_e (-1) | ||
13 | test $ 5 + (fst.exp_e) 1000 | ||
14 | test $ bessel_zero_Jnu_e (-0.3) 2 | ||
15 | |||
16 | putStrLn "Bye" \ No newline at end of file | ||