Skip to content

Commit

Permalink
v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
richrdkng committed Sep 3, 2016
1 parent ab8fe44 commit 72201f8
Show file tree
Hide file tree
Showing 7 changed files with 969 additions and 560 deletions.
25 changes: 17 additions & 8 deletions dist/exception/InvalidGlobException.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
'use strict';

const Exception = require(`js-lang-exception`);
/**
* @namespace js.task.path.exception
*/

const Exception = require('js-lang-exception');

/**
* Exception ID.
*
* @private
* @const {number} ID
*/
const ID = 1001;

/**
* Exception, when the glob must be a string or an array.
*
* @class InvalidGlobException
* @memberOf js.task.path.exception
*/
module.exports = class InvalidGlobException extends Exception {

/**
* @return {number} Exception ID
*/
static get ID() {
return ID;
}

constructor(glob) {
const type = typeof glob;

Expand Down
25 changes: 17 additions & 8 deletions dist/exception/InvalidPathNameException.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
'use strict';

const Exception = require(`js-lang-exception`);
/**
* @namespace js.task.path.exception
*/

const Exception = require('js-lang-exception');

/**
* Exception ID.
*
* @private
* @const {number} ID
*/
const ID = 1002;

/**
* Exception, when the path name must be a non-empty string.
*
* @class InvalidPathNameException
* @memberOf js.task.path.exception
*/
module.exports = class InvalidPathNameException extends Exception {

/**
* @return {number} Exception ID
*/
static get ID() {
return ID;
}

constructor(pathName) {
super(`Invalid path name, the path name must be a non-empty string, got: "${pathName}"'`, ID);
}
Expand Down
30 changes: 20 additions & 10 deletions dist/exception/PathNotFoundException.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
'use strict';

const Exception = require(`js-lang-exception`);
/**
* @namespace js.task.path.exception
*/

const Exception = require('js-lang-exception'),
isString = require('js-partial-is-string');

/**
* Exception ID.
*
* @private
* @const {number} ID
*/
const ID = 1003;

/**
* Exception, when path not found with name.
*
* @class PathNotFoundException
* @memberOf js.task.path.exception
*/
module.exports = class PathNotFoundException extends Exception {

/**
* @return {number} Exception ID
*/
static get ID() {
return ID;
}

constructor(pathName, glob = null) {
if (glob !== null) {
constructor(pathName, glob) {
if (isString(glob)) {
super(`Path not found with name: "${pathName}", glob: "${glob}"'`, ID);
} else {
super(`Path not found with name: "${pathName}"'`, ID);
Expand Down
25 changes: 17 additions & 8 deletions dist/exception/TypeException.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
'use strict';

const Exception = require(`js-lang-exception`);
/**
* @namespace js.task.path.exception
*/

const Exception = require('js-lang-exception');

/**
* Exception ID.
*
* @private
* @const {number} ID
*/
const ID = 1004;

/**
* Exception, when the optional argument "options" must be an object.
*
* @class TypeException
* @memberOf js.task.path.exception
*/
module.exports = class TypeException extends Exception {

/**
* @return {number} Exception ID
*/
static get ID() {
return ID;
}

constructor(options) {
const type = typeof options;

Expand Down

0 comments on commit 72201f8

Please sign in to comment.