# All files / lib/error httperror.js

36.36% Statements 4/11
0% Branches 0/4
0% Functions 0/1
36.36% Lines 4/11

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    209x

    9x

    9x

    9x
     var util = require('util');

    var HttpError = function(message, options) {
        Error.call(this);
        Error.captureStackTrace(this, this.constructor);

        this.name = 'HttpError';
        this.message = message;

        options = options || {};

        for(var k in options) {
          this[k] = this[k] || options[k];
        }
    };

    util.inherits(HttpError, Error);

    module.exports = HttpError;