Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCO needs string? #9

Closed
taoeffect opened this issue Apr 18, 2014 · 0 comments
Closed

BCO needs string? #9

taoeffect opened this issue Apr 18, 2014 · 0 comments

Comments

@taoeffect
Copy link

so that native-packet-dns can log the amount of room that was needed (but not available) to the console.

Meaning, instead of:

BufferCursor.prototype._checkWrite = function(size) {
  if (this._pos + size > this.length)
    throw new BCO();
}

This:

BufferCursor.prototype._checkWrite = function(size) {
  if (this._pos + size > this.length)
    throw new BCO("can't write "+size+' bytes, have room for '+(this.length-this._pos)+' bytes only');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant