Details
Description
Fix the division by 0; exception example in the Haskell tutorial
Running https://gist.github.com/cheecheeo/9521607#file-test-sh:
+ pushd .cabal-sandbox/bin ~/packages/thrift/.cabal-sandbox/bin ~/packages/thrift + trap 'kill -9 17219' EXIT + ./HaskellServer + ./HaskellClient "Starting the server..." HaskellClient: connect: does not exist (Connection refused) + sleep 0.1 + ./HaskellClient "ping()" "ping()" add(1,1) 1+1=2 calculate(1, Work {f_Work_num1 = Just 1, f_Work_num2 = Just 0, f_Work_op = Just DIVIDE, f_Work_comment = Nothing}) InvalidOperation InvalidOperation {f_InvalidOperation_what = Just 4, f_InvalidOperation_why = Just "Cannot divide by 0"} calculate(1, Work {f_Work_num1 = Just 15, f_Work_num2 = Just 10, f_Work_op = Just SUBTRACT, f_Work_comment = Nothing}) 15-10=5 Check log: 5 + popd ~/packages/thrift + kill -9 17219
Attachments
Attachments
Issue Links
- depends upon
-
THRIFT-2401 Haskell tutorial compiles
- Closed