Class: Svn::CError

Inherits:
FFI::ManagedStruct
  • Object
show all
Defined in:
lib/svn/errors.rb

Defined Under Namespace

Modules: C

Constant Summary collapse

MSG_BUFFER =
FFI::MemoryPointer.new(1024)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.release(ptr) ⇒ Object



95
96
97
# File 'lib/svn/errors.rb', line 95

def release( ptr )
  C.clear( ptr )
end

Instance Method Details

#cause_messageObject

returns the most specific error message from this error chain



151
152
153
# File 'lib/svn/errors.rb', line 151

def cause_message
  root_cause.best_message
end

#codeObject



164
165
166
# File 'lib/svn/errors.rb', line 164

def code
  self[:error_code]
end

#messageObject

returns a combined message if there are children, or the best otherwise



156
157
158
159
160
161
162
# File 'lib/svn/errors.rb', line 156

def message
  if self[:child].null?
    best_message
  else
    "#{best_message}: #{cause_message}"
  end
end