core/errors.js
function FistError(code, msg) {
    var err = new Error(f('(%s) %s', code, msg));

    err.name = this.name;

    Error.captureStackTrace(err, this.constructor);

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.code = code;

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.message = err.message;

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.stack = err.stack;
}
function FistError(code, msg) {
    var err = new Error(f('(%s) %s', code, msg));

    err.name = this.name;

    Error.captureStackTrace(err, this.constructor);

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.code = code;

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.message = err.message;

    /**
     * @public
     * @memberOf {FistError}
     * @property
     * @type {String}
     * */
    this.stack = err.stack;
}
@class FistError
@extends Error

@param {String} code
@param {String} msg