class Object

Public Instance Methods

error(message, type=:standard, backtrace=nil) click to toggle source

Patching Object with universally accessible top level error method. The method is used throughout the lib instead of plainly raising exceptions. This allows lib user to easily inject user-specific error handling into the lib by just replacing Object#error method.

# File lib/support/errors.rb, line 24
def error message, type=:standard, backtrace=nil
  e = case type
  when :standard
    ActiveOrientOrient::Error.new message
  when :args
    ActiveOrient::ArgumentError.new message
  when :symbol
    ActiveOrient::SymbolError.new message
  when :load
    AcitveOrient::LoadError.new message
  when :server
    ActiveOrient::Error::ServerError.new message
  end
  e.set_backtrace(backtrace) if backtrace
  raise e
end
from_orient() click to toggle source
# File lib/other.rb, line 120
def from_orient
  self
end
to_or() click to toggle source
# File lib/other.rb, line 138
def to_or
        self
end
to_orient() click to toggle source
# File lib/other.rb, line 124
def to_orient
  self
end