Skip to content

Commit

Permalink
docs updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Jun 24, 2016
1 parent 8a8db5f commit afecfc7
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 14 deletions.
27 changes: 23 additions & 4 deletions lib/errors/batch.js
Expand Up @@ -7,12 +7,31 @@ var $npm = {
};

/**
* @class errors.BatchError
* @augments Error
* @interface errors.BatchError
* @augments external:Error
* @description
* Bla-bla.
* This type represents any error rejected by method {@link batch}.
*
* @property {string} name
* Standard {@link external:Error Error} property - error type name = `BatchError`.
*
* @property {string} message
* Standard {@link external:Error Error} property - the error message.
*
* @property {object} stack
* Standard {@link external:Error Error} property - the stack trace.
*
* @property {} data
*
* @property {} stat
*
* @property {number} stat.total
* @property {number} stat.succeeded
* @property {number} stat.failed
* @property {number} stat.duration
*
* @property {error} first
*
* @returns {errors.BatchError}
*/
function BatchError(result, errors, duration) {

Expand Down
7 changes: 6 additions & 1 deletion lib/errors/index.js
Expand Up @@ -9,7 +9,7 @@ var $npm = {
/**
* @namespace errors
* @description
* Error types namespace, available as `spex.errors`.
* Error types namespace.
*
* @property {function} BatchError
* {@link errors.BatchError BatchError} class constructor.
Expand All @@ -34,3 +34,8 @@ module.exports = {
};

Object.freeze(module.exports);

/**
* @external Error
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
*/
24 changes: 19 additions & 5 deletions lib/errors/page.js
Expand Up @@ -6,20 +6,34 @@ var $npm = {
};

/**
* @class errors.PageError
* @augments Error
* @interface errors.PageError
* @augments external:Error
* @description
* Bla-bla.
* This type represents any error rejected by method {@link page}.
*
* @property {string} name
* Standard {@link external:Error Error} property - error type name = `PageError`.
*
* @property {string} message
* Standard {@link external:Error Error} property - the error message.
*
* @property {object} stack
* Standard {@link external:Error Error} property - the stack trace.
*
* @property {} source
*
* @property {} dest
*
* @property {} data
*
* @returns {errors.PageError}
*/
function PageError(e) {

var temp = Error.apply(this, arguments);
temp.name = this.name = 'PageError';

this.index = e.index;

if ('data' in e) {
this.data = e.data;
this.error = e.data.first;
Expand Down
16 changes: 12 additions & 4 deletions lib/errors/sequence.js
Expand Up @@ -14,12 +14,20 @@ var errDetails = {
};

/**
* @class errors.SequenceError
* @augments Error
* @interface errors.SequenceError
* @augments external:Error
* @description
* Bla-bla.
* This type represents any error rejected by method {@link sequence}.
*
* @property {string} name
* Standard {@link external:Error Error} property - error type name = `SequenceError`.
*
* @property {string} message
* Standard {@link external:Error Error} property - the error message.
*
* @property {object} stack
* Standard {@link external:Error Error} property - the stack trace.
*
* @returns {errors.SequenceError}
*/
function SequenceError(e, code, cbName, duration) {
var temp = Error.apply(this, arguments);
Expand Down

0 comments on commit afecfc7

Please sign in to comment.