[ https://issues.apache.org/jira/browse/THRIFT-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-2453. --------------------------------- Resolution: Fixed Assignee: Roger Meier committed as part of THRIFT-2401 > haskell tutorial: fix up division by 0 example > ---------------------------------------------- > > Key: THRIFT-2453 > URL: https://issues.apache.org/jira/browse/THRIFT-2453 > Project: Thrift > Issue Type: Improvement > Components: Tutorial > Environment: The Glorious Glasgow Haskell Compilation System, version > 7.6.3 > Linux > Reporter: John Chee > Assignee: Roger Meier > Attachments: 0001-haskell-tutorial-fix-up-division-by-0-example.patch > > > Fix the division by 0; exception example in the Haskell tutorial > Running https://gist.github.com/cheecheeo/9521607#file-test-sh: > {code} > + 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 > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)