Class: CommandStatus

messages.CommandStatus(isSuccess, errorMessageopt)

The status returned by a command handler.

Constructor

new CommandStatus(isSuccess, errorMessageopt)

Creates a new instance of CommandStatus.

Parameters:
Name Type Attributes Description
isSuccess boolean

Indicates whether the command was successful.

errorMessage string <optional>

The error message if the command failed.

Members

errorMessage :string

The error message if the command failed.

Type:
  • string

isSuccess :boolean

Indicates whether the command was successful.

Type:
  • boolean

Methods

(static) failure(errorMessage)

Creates a failed status.

Parameters:
Name Type Description
errorMessage string

(static) success()

Creates a successful status.