class Linearly::Errors::StateNotReturned

{StateNotReturned} is an error that is getting thrown when one of {Step}s in the {Flow} does not return an instance of Statefully::State. @api public

Attributes

output[R]

Value that caused the error

@return [Object] @api public @example

Linearly::Errors::StateNotReturned
  .new(output: 'surprise', step: 'step')
  .output
=> "surprise"
step[R]

Name of the step that caused the error

@return String @api public @example

Linearly::Errors::StateNotReturned
  .new(output: 'surprise', step: 'step')
  .step
=> "step"

Public Class Methods

new(output:, step:) click to toggle source

Constructor for the {StateNotReturned} class

@param output: [Object] @param step: [String]

@api public @example

Linearly::Errors::StateNotReturned
  .new(output: 'surprise', step: 'step')
Calls superclass method
# File lib/linearly/errors/state_not_returned.rb, line 38
def initialize(output:, step:)
  str = output.inspect
  super("#{str}, returned from #{step}, is not a Statefully::State")
  @output = output
  @step = step
end