Exception: LaunchDarkly::Impl::FileData::ReadError Private

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ldclient-rb/impl/file_data/document.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Raised when a file cannot be read or parsed. It carries the path so that callers can tell a per-file failure from a failure to merge the files' contents.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, message, missing: false) ⇒ ReadError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ReadError.

Parameters:

  • path (String)
  • message (String)
  • missing (Boolean) (defaults to: false)

Since:

  • 5.5.0



33
34
35
36
37
# File 'lib/ldclient-rb/impl/file_data/document.rb', line 33

def initialize(path, message, missing: false)
  super("#{message} [#{path}]")
  @path = path
  @missing = missing
end

Instance Attribute Details

#missing ⇒ Boolean (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns true when the file does not exist.

Returns:

  • (Boolean) —

    true when the file does not exist

Since:

  • 5.5.0



26
27
28
# File 'lib/ldclient-rb/impl/file_data/document.rb', line 26

def missing
  @missing
end

#path ⇒ String (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)

Since:

  • 5.5.0



23
24
25
# File 'lib/ldclient-rb/impl/file_data/document.rb', line 23

def path
  @path
end