View Source Vtc.Framerate.ParseError exception (vtc v0.17.5)

Exception returned when a framerate cannot be parsed.

struct-fields

Struct Fields

  • reason: The reason the error occurred.

failure-reasons

Failure Reasons

The following values can appear in the :reason fields:

  • :bad_drop_rate: Returned when the playback speed of a framerate with an ntsc value of :drop is not divisible by 3000/1001 (29.97), for more on why drop-frame framerates must be a multiple of 29.97, see: https://www.davidheidelberger.com/2010/06/10/drop-frame-timecode/

  • :invalid_ntsc: Returned when the ntsc value is not one of the allowed atom values.

  • :unrecognized_format: Returned when a string value is not a recognized format.

  • :imprecise_float - Returned when a float was passed with an NTSC value of nil. Without the ability to round to the nearest valid NTSC value, floats are not precise enough to build an arbitrary framerate.

Link to this section Summary

Types

t()

Type of ParseError

Functions

Returns a message for the error reason.

Link to this section Types

@type t() :: %Vtc.Framerate.ParseError{
  __exception__: true,
  reason:
    :invalid_ntsc
    | :coerce_requires_ntsc
    | :unrecognized_format
    | :imprecise_float
    | :non_positive
    | :invalid_ntsc_rate
    | :bad_drop_rate
}

Type of ParseError

Link to this section Functions

@spec message(t()) :: String.t()

Returns a message for the error reason.