Skip to content

Commit

Permalink
ref #6 Nicer error message including failure code, helps with trouble…
Browse files Browse the repository at this point in the history
…shooting.
  • Loading branch information
ediweissmann committed Sep 2, 2016
1 parent f5fabea commit 9765e40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/protocol/x224.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ Client.prototype.recvConnectionConfirm = function(s) {
var message = serverConnectionConfirm().read(s);

if(message.obj.protocolNeg.obj.type.value == NegotiationType.TYPE_RDP_NEG_FAILURE) {
throw new error.ProtocolError('NODE_RDP_PROTOCOL_X224_NEG_FAILURE');
throw new error.ProtocolError('NODE_RDP_PROTOCOL_X224_NEG_FAILURE',
'Failure code:' + message.obj.protocolNeg.obj.result.value + " (see https://msdn.microsoft.com/en-us/library/cc240507.aspx)");
}

if(message.obj.protocolNeg.obj.type.value == NegotiationType.TYPE_RDP_NEG_RSP) {
Expand Down

0 comments on commit 9765e40

Please sign in to comment.