FlitterError

libflitter/errors/FlitterError~ FlitterError

An error class that provides some extra functionality specific to Flitter.

Constructor

new FlitterError(…args)

Source:

Instantiate the error. Set a default component name and message.

Parameters:
Name Type Attributes Description
args <repeatable>

Extends

  • Error

Members

component :string

Source:

Name of the Flitter component that encountered an error.

Type:
  • string

message :string

Source:

The error message.

Type:
  • string

Methods

required(service) → {FlitterError}

Source:

Creates an error message for missing services by name.

Parameters:
Name Type Description
service string | Array.<string>

the name of the service or array of services that are required

Returns:
  • instance of self to allow chaining
Type
FlitterError

unit(nameopt) → {string|FlitterError}

Source:

Get or set the component name.

Parameters:
Name Type Attributes Default Description
name string | null <optional>
null

name of the component

Returns:
Type
string | FlitterError