Fix possible exceptions in example gRPC clients. #445

Merged
merged 1 commit into from Dec 8, 2016

Projects

None yet

2 participants

@jrick
Member
jrick commented Dec 8, 2016

While here, switch the indentation of the node example to use two
space indents since this is common practice in javascript.

Fixes #443.

rpc/documentation/clientusage.md
@@ -353,28 +353,30 @@ var grpc = require('grpc');
var protoDescriptor = grpc.load('./api.proto');
var walletrpc = protoDescriptor.walletrpc;
-var certPath = path.join(process.env.HOME, '.dcrwallet', 'rpc.cert');
+var certPath = '';
if (os.platform == 'win32') {
@jcvernaleo
jcvernaleo Dec 8, 2016 Member

As was mentioned for decrediton, shouldn't it be os.platform() ?

@jrick
jrick Dec 8, 2016 Member

I have honestly no idea. but I can switch it

@jcvernaleo
jcvernaleo Dec 8, 2016 Member
jcv@triforce ~ $ node
> os.platform
[Function]
> os.platform()
'linux'
> 

So yes, it should be as it is a function.

@jrick
jrick Dec 8, 2016 Member

fixed

@jrick jrick Fix possible exceptions in example gRPC clients.
While here, switch the indentation of the node example to use two
space indents since this is common practice in javascript.

Fixes #443.
1a65913
@jcvernaleo

Looks good now.
OK

@jrick jrick merged commit 2eed05d into decred:master Dec 8, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jrick jrick deleted the jrick:doco branch Dec 8, 2016
@jcvernaleo jcvernaleo referenced this pull request in decred/decrediton Dec 8, 2016
Closed

Fix rpc loading to avoid possible exception #42

@jcvernaleo jcvernaleo added a commit to jcvernaleo/decrediton that referenced this pull request Dec 8, 2016
@jcvernaleo jcvernaleo Fix possible exception in cert load.
Taken from decred/dcrwallet#445

Closes #42
b055463
@jcvernaleo jcvernaleo referenced this pull request in decred/decrediton Dec 8, 2016
Merged

Fix possible exception in cert load. #46

@alexlyp alexlyp added a commit to decred/decrediton that referenced this pull request Dec 8, 2016
@jcvernaleo @alexlyp jcvernaleo + alexlyp Fix possible exception in cert load. (#46)
Taken from decred/dcrwallet#445

Closes #42
85c7f58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment