Exception: Mistri::WorkspaceConflictError
- Defined in:
- lib/mistri/errors.rb
Overview
A conditional document write lost to a different committed version. The revisions stay off the message so a stale full replacement cannot borrow a fresh token without reading the matching content.
Instance Attribute Summary collapse
-
#actual_revision ⇒ Object
readonly
Returns the value of attribute actual_revision.
-
#expected_revision ⇒ Object
readonly
Returns the value of attribute expected_revision.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, expected_revision: nil, actual_revision: nil) ⇒ WorkspaceConflictError
constructor
A new instance of WorkspaceConflictError.
Constructor Details
#initialize(path, expected_revision: nil, actual_revision: nil) ⇒ WorkspaceConflictError
Returns a new instance of WorkspaceConflictError.
129 130 131 132 133 134 |
# File 'lib/mistri/errors.rb', line 129 def initialize(path, expected_revision: nil, actual_revision: nil) @path = path.to_s.dup.freeze @expected_revision = expected_revision.nil? ? nil : expected_revision.to_s.dup.freeze @actual_revision = actual_revision.nil? ? nil : actual_revision.to_s.dup.freeze super("document #{@path.inspect} changed; read it again before retrying") end |
Instance Attribute Details
#actual_revision ⇒ Object (readonly)
Returns the value of attribute actual_revision.
127 128 129 |
# File 'lib/mistri/errors.rb', line 127 def actual_revision @actual_revision end |
#expected_revision ⇒ Object (readonly)
Returns the value of attribute expected_revision.
127 128 129 |
# File 'lib/mistri/errors.rb', line 127 def expected_revision @expected_revision end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
127 128 129 |
# File 'lib/mistri/errors.rb', line 127 def path @path end |