@spalger/kibana
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
19 lines (16 loc) • 517 B
JavaScript
var _ = require('lodash');
var util = require('util');
function SetupError(server, template, err) {
var config = server.config().get();
// don't override other setup errors
if (err && err instanceof SetupError) return err;
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = _.template(template)(config);
if (err) {
this.origError = err;
if (err.stack) this.stack = err.stack;
}
}
util.inherits(SetupError, Error);
module.exports = SetupError;