All files / transform transformError.js

0% Statements 0/3
100% Branches 0/0
0% Functions 0/1
0% Lines 0/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                         
/**
 * Use this to specify an error occured within a `Transformation`. This allows
 * you to pass the node so the CLI or others can obtain location data and show
 * exactly where the error occured.
 * 
 */
export default class TransformError extends Error {
    /**
     * @param {string} message - error message
     * @param {Node} node - erroring node
     */
    constructor(message, node) {
        super(message);
        
        /** @private */
        this.name = 'Transform Error';
        
        /** @private */
        this.node = node;
    }
}