Fix the erlang tutorial
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1071148 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tutorial/erl/server.erl b/tutorial/erl/server.erl
index 5a994ce..4915606 100644
--- a/tutorial/erl/server.erl
+++ b/tutorial/erl/server.erl
@@ -39,17 +39,17 @@
{ Op, Num1, Num2 } = { Work#work.op, Work#work.num1, Work#work.num2 },
debug("calculate(~p, {~p,~p,~p})", [Logid, Op, Num1, Num2]),
case Op of
- ?tutorial_ADD -> Num1 + Num2;
- ?tutorial_SUBTRACT -> Num1 - Num2;
- ?tutorial_MULTIPLY -> Num1 * Num2;
+ ?tutorial_Operation_ADD -> Num1 + Num2;
+ ?tutorial_Operation_SUBTRACT -> Num1 - Num2;
+ ?tutorial_Operation_MULTIPLY -> Num1 * Num2;
- ?tutorial_DIVIDE when Num2 == 0 ->
- throw(#invalidOperation{what=Op, why="Cannot divide by 0"});
- ?tutorial_DIVIDE ->
- Num1 div Num2;
+ ?tutorial_Operation_DIVIDE when Num2 == 0 ->
+ throw(#invalidOperation{what=Op, why="Cannot divide by 0"});
+ ?tutorial_Operation_DIVIDE ->
+ Num1 div Num2;
- _Else ->
- throw(#invalidOperation{what=Op, why="Invalid operation"})
+ _Else ->
+ throw(#invalidOperation{what=Op, why="Invalid operation"})
end.
getStruct(Key) ->