UNPKG

812 BJavaScriptView Raw
1/**
2 * @file Defines the ModelRequiredError class.
3 */
4
5"use strict";
6
7const ModelError = require( "@corefw/model" )
8 .errors.abstract.ModelError;
9
10/**
11 * Thrown whenever an endpoint does not specify a model.
12 *
13 * @memberOf Errors
14 * @extends Errors.Abstract.ModelError
15 */
16class ModelRequiredError extends ModelError {
17
18 /**
19 * @param {Error} [cause] - An optional Error object that can be provided if
20 * this error was caused by another.
21 * @param {string} message - An error message that provides clients with a
22 * description of the error condition and, potentially, how it might be
23 * resolved.
24 * @param {...*} [args] - Printf style arguments for the message.
25 */
26 constructor( cause, message, ...args ) {
27
28 super( cause, message, ...args );
29 }
30}
31
32module.exports = ModelRequiredError;