Exception: StoreAgent::InvalidRevisionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/store_agent/exceptions.rb

Overview

バージョン管理時に、不正なリビジョンが指定された場合に発生する例外クラス

workspace.file("path/to/file").read(revision: "invalid revision")
# => 存在しないリビジョンを指定した場合、例外が発生する

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path: "", revision: "") ⇒ InvalidRevisionError

Returns a new instance of InvalidRevisionError.



78
79
80
81
# File 'lib/store_agent/exceptions.rb', line 78

def initialize(path: "", revision: "")
  @path = path
  @revision = revision
end

Instance Attribute Details

#pathObject (readonly)

:nodoc:



76
77
78
# File 'lib/store_agent/exceptions.rb', line 76

def path
  @path
end

#revisionObject (readonly)

:nodoc:



76
77
78
# File 'lib/store_agent/exceptions.rb', line 76

def revision
  @revision
end

Instance Method Details

#to_sObject

:nodoc:



83
84
85
# File 'lib/store_agent/exceptions.rb', line 83

def to_s # :nodoc:
  "invalid revision: path=#{path} revision=#{revision}"
end