<commit_before>/**
 * Paginator errors module
 * @module classes/paginator/errors
 * @namespace Pagiantor.errors
 */
'use strict';

/**
 * Must be thrown when trying to access a page with an invalid rank
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 * @param {Number} rank The invalid page rank
 */
function InvalidPageRankError(rank){
  this.name = 'InvalidPageRankError';
  this.message = rank + ' is an invalid page rank';
  this.stack = (new Error()).stack;
}
InvalidPageRankError.prototype = Error.prototype;

/**
 * Must be thrown when the DOM range of the text cursor is out of a paginated DOM tree.
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidFocusedRangeError(){
  this.name = 'InvalidFocusedRangeError';
  this.message = 'The text cursor if out of any page.';
  this.stack = (new Error()).stack;
}
InvalidFocusedRangeError.prototype = Error.prototype;

/**
 * Must be thrown when the current page height doesn't match required values
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidPageHeightError(height){
  this.name = 'InvalidPageHeightError';
  this.message = height + 'px is an invalid page height.';
  this.stack = (new Error()).stack;
}
InvalidPageHeightError.prototype = new Error;

/**
 * Must be thrown when the requested cursor position doesn't match required values.
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidCursorPosition(requestedPosition){
  this.name = 'InvalidCursorPosition';
  this.message = requestedPosition + 'is an invalid cursor position.';
  this.stack = (new Error()).stack;
}
InvalidCursorPosition.prototype = new Error;

//
// export Paginator.errors namespace
//
module.exports = {
  InvalidPageRankError:InvalidPageRankError,
  InvalidFocusedRangeError:InvalidFocusedRangeError,
  InvalidPageHeightError:InvalidPageHeightError,
  InvalidCursorPosition:InvalidCursorPosition
};<commit_msg>fix Missing '()' invoking a constructor.<commit_after>/**
 * Paginator errors module
 * @module classes/paginator/errors
 * @namespace Pagiantor.errors
 */
'use strict';

/**
 * Must be thrown when trying to access a page with an invalid rank
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 * @param {Number} rank The invalid page rank
 */
function InvalidPageRankError(rank){
  this.name = 'InvalidPageRankError';
  this.message = rank + ' is an invalid page rank';
  this.stack = (new Error()).stack;
}
InvalidPageRankError.prototype = Error.prototype;

/**
 * Must be thrown when the DOM range of the text cursor is out of a paginated DOM tree.
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidFocusedRangeError(){
  this.name = 'InvalidFocusedRangeError';
  this.message = 'The text cursor if out of any page.';
  this.stack = (new Error()).stack;
}
InvalidFocusedRangeError.prototype = Error.prototype;

/**
 * Must be thrown when the current page height doesn't match required values
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidPageHeightError(height){
  this.name = 'InvalidPageHeightError';
  this.message = height + 'px is an invalid page height.';
  this.stack = (new Error()).stack;
}
InvalidPageHeightError.prototype = Error.prototype;

/**
 * Must be thrown when the requested cursor position doesn't match required values.
 * @class
 * @memberof  Paginator.errors
 * @extends Error
 */
function InvalidCursorPosition(requestedPosition){
  this.name = 'InvalidCursorPosition';
  this.message = requestedPosition + 'is an invalid cursor position.';
  this.stack = (new Error()).stack;
}
InvalidCursorPosition.prototype = Error.prototype;

//
// export Paginator.errors namespace
//
module.exports = {
  InvalidPageRankError:InvalidPageRankError,
  InvalidFocusedRangeError:InvalidFocusedRangeError,
  InvalidPageHeightError:InvalidPageHeightError,
  InvalidCursorPosition:InvalidCursorPosition
};
{'fraction_non_alphanumeric': 0.10658865428644111, 'fraction_numerical': 0.0, 'mean_word_length': 4.641319942611191, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4869168', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1099, 'n_words': 340}