Top Level Namespace
Defined Under Namespace
Modules: CoreExtensions, IB, IBSupport, Support Classes: FalseClass, NilClass, Numeric, Object, String, Symbol, Time, TrueClass
Constant Summary collapse
- IbRuby =
IB
- Ib =
IB
- MIN_CLIENT_VER =
100 = enhanced handshake, msg length prefixes
100
- MAX_CLIENT_VER =
137
Instance Method Summary collapse
-
#error(message, type = :standard, backtrace = nil) ⇒ Object
Patching Object with universally accessible top level error method.
Instance Method Details
#error(message, type = :standard, backtrace = nil) ⇒ Object
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.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ib/errors.rb', line 27 def error , type=:standard, backtrace=nil e = case type when :standard IB::Error.new when :args IB::ArgumentError.new when :symbol IB::SymbolError.new when :load IB::LoadError.new when :flex IB::FlexError.new when :reader IB::TransmissionError.new when :verify IB::VerifyError.new end e.set_backtrace(caller) if backtrace raise e end |