THRIFT-727 - C++: what() method of generated exceptions will provide more information
Patch: Anna Dymek <aadymek@gmail.com>
Client: C++
This closes #469
diff --git a/tutorial/nodejs/NodeServerPromise.js b/tutorial/nodejs/NodeServerPromise.js
index 4fd0a35..bff287b 100644
--- a/tutorial/nodejs/NodeServerPromise.js
+++ b/tutorial/nodejs/NodeServerPromise.js
@@ -47,14 +47,14 @@
} else if (work.op === ttypes.Operation.DIVIDE) {
if (work.num2 === 0) {
var x = new ttypes.InvalidOperation();
- x.what = work.op;
+ x.whatOp = work.op;
x.why = 'Cannot divide by 0';
throw x;
}
val = work.num1 / work.num2;
} else {
var x = new ttypes.InvalidOperation();
- x.what = work.op;
+ x.whatOp = work.op;
x.why = 'Invalid operation';
throw x;
}