lib/exceptions/CommandNotFoundException.js   A
last analyzed

Size

Lines of Code 27

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
dl 0
loc 27
rs 10
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A CommandNotFoundException.js ➔ ??? 0 19 1
1
/**
2
 * When a command is not found
3
 * @class CommandNotFoundException
4
 * @extends {Error}
5
 */
6
class CommandNotFoundException extends Error {
7
    /**
8
     * Creates an instance of CommandNotFoundException.
9
     * @param {string} command the command
10
     * @memberof CommandNotFoundException
11
     */
12
  constructor (command) {
13
    super('The following command was not found: ' + command)
14
        /**
15
         * The unknown command
16
         * @type {string}
17
         * @name CommandNotFoundException#command
18
         * @readonly
19
         */
20
    this.command = command
21
        /**
22
         * The fisherCode
23
         * @readonly
24
         * @constant
25
         * @name CommandNotFoundException#code
26
         * @type {number}
27
         * @default 404
28
         */
29
    this.code = 404
30
  }
31
}
32
module.exports = CommandNotFoundException
33