Class: ProtocolError

util. ProtocolError

Error subclass indicating a protocol specifc error.

new util.ProtocolError(message, properties)

Constructs a new protocol error.

Name Type Description
message string

Error message

properties Object.<string, *> optional

Additional properties

Example
try {
    MyMessage.decode(someBuffer); // throws if required fields are missing
} catch (e) {
    if (e instanceof ProtocolError && e.instance)
        console.log("decoded so far: " + JSON.stringify(e.instance));
}

Extends

  • Error

Members

instance { Message.<T> }

So far decoded message instance.