# all files / errors/ TractorError.js

100% Statements 51/51
100% Branches 28/28
100% Functions 6/6
100% Lines 7/7
16 statements, 13 branches Ignored

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15

    1
    50
    50
    50
    50
    50

     'use strict';

    // Constants:
    import constants from '../constants';

    export default class TractorError extends Error {
        constructor (message, status) {
            super();
            this.message = message;
            this.name = 'TractorError';
            this.status = status || constants.SERVER_ERROR;
            Error.captureStackTrace(this, TractorError);
        }
    }