Exception: QueryStream::DataNotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/query_stream/errors.rb

Overview

データファイルが存在しない

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, expected_path: nil, query: nil, location: nil) ⇒ DataNotFoundError

Returns a new instance of DataNotFoundError.



46
47
48
49
50
51
# File 'lib/query_stream/errors.rb', line 46

def initialize(msg = nil, expected_path: nil, query: nil, location: nil)
  super(msg || "データファイルが見つかりません: #{expected_path}")
  @expected_path = expected_path
  @query         = query
  @location      = location
end

Instance Attribute Details

#expected_pathString (readonly)

期待されたデータファイルパス

Returns:

  • (String)

    the current value of expected_path



43
44
45
# File 'lib/query_stream/errors.rb', line 43

def expected_path
  @expected_path
end

#locationString (readonly)

ソースファイル名と行番号

Returns:

  • (String)

    the current value of location



43
44
45
# File 'lib/query_stream/errors.rb', line 43

def location
  @location
end

#queryString (readonly)

元の QueryStream 記法

Returns:

  • (String)

    the current value of query



43
44
45
# File 'lib/query_stream/errors.rb', line 43

def query
  @query
end