toJSON () {
        let { spec, uid, processed, level, id } = this;
        let error = this.stack.toString();
        return {
            id,
            uid,
            level,
            error,
            processed,
            ...spec
        };
    }
/**
     * @description Representation of error data in object format.
     * @example
     * let err = ErrorSpec.create(id);
     * err.toJSON();
     * @returns {ErrorSpec.toJSON}
     * @public
     */
@description Representation of error data in object format.
@description Representation of error data in object format .
toJSON () {
        let { spec, uid, processed, level, id } = this;
        let error = this.stack.toString();
        return {
            id,
            uid,
            level,
            error,
            processed,
            ...spec
        };
    }
toJSON ( ) { let { spec , uid , processed , level , id } = this ; let error = this . stack . toString ( ) ; return { id , uid , level , error , processed , ... spec } ; }
@description Representation of error data in object format.
@description Representation of error data in object format .