TrackError

TrackError

The `TrackError` class represents a base error class for various errors thrown in the `Track` class and potentially any subclass that extends it.

Constructor

# new TrackError(track, messagenullable)

`TrackError` class constructor.
Parameters:
Name Type Attributes Description
track Track
message String | Error <nullable>

Extends

  • Error

Members

# code

The `TrackError` error code.

# message

The `TrackError` error message.

Methods

# (static) from(errornullable, …argsnullable) → {TrackError}

Creates a new `TrackError` or extended class from an existing error or input. This is used for creating a new error from a previously created `TrackError` like: TrackValidationError.from(new TrackPropertiesError(track)) will create a new `TrackValidationError` preserving the message created by `TrackPropertiesError`
Parameters:
Name Type Attributes Description
error TrackError | Track | Mixed <nullable>
args Mixed <nullable>
<repeatable>
Returns:
Type
TrackError