/**
* @module libflitter/errors/UnitRuntimeDependencyError
*/
const SoftError = require('./SoftError')
/**
* Error thrown when a Unit is unable to start because one or more of
* its dependencies are missing.
* @extends module:libflitter/error/SoftError~SoftError
*/
class UnitRuntimeDependencyError extends SoftError {
constructor(unit_name, missing_dependencies) {
super(`The unit ${unit_name} is unable to start because it is missing one or more dependencies: ${missing_dependencies.join(', ')}`)
this.unit(unit_name).required(missing_dependencies)
}
}
module.exports = exports = UnitRuntimeDependencyError