diff options
author | Chandler May <chandler.camille.may@gmail.com> | 2022-12-18 14:10:53 -0500 |
---|---|---|
committer | Jens Geyer <Jens-G@users.noreply.github.com> | 2023-03-02 00:12:25 +0100 |
commit | c3d66d2eec27ae8e6e96ad705e706b0920b6bdb5 (patch) | |
tree | 08be5ab35103b7bfb86ecb847f9c9032c95b0036 /tutorial | |
parent | a3c27f9723cedd11ef0884e83ed0febb37e2c316 (diff) | |
download | thrift-c3d66d2eec27ae8e6e96ad705e706b0920b6bdb5.tar.gz |
THRIFT-5674: Catch and handle server implementation exceptions
Client: js:es6
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/nodejs/NodeClientPromise.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tutorial/nodejs/NodeClientPromise.js b/tutorial/nodejs/NodeClientPromise.js index 2cdc184f9..e6ff2d7f4 100644 --- a/tutorial/nodejs/NodeClientPromise.js +++ b/tutorial/nodejs/NodeClientPromise.js @@ -57,7 +57,7 @@ client.calculate(1, work) .then(function(message) { console.log('Whoa? You know how to divide by zero?'); }) - .fail(function(err) { + .catch(function(err) { console.log("InvalidOperation " + err); }); @@ -74,7 +74,7 @@ client.calculate(1, work) .then(function(message) { console.log('Check log: ' + message.value); }) - .fin(function() { + .finally(function() { //close the connection once we're done connection.end(); }); |