module TryCatch::EXT::Object
Public Instance Methods
__catch__(*exception_classes, &block)
click to toggle source
> catch from cach or on self obj
# File lib/try-catch/syntax.rb, line 23 def __catch__ *exception_classes, &block ::TryCatch::Function.catch self, *exception_classes, &block end
__try__(*exception_classes, &block)
click to toggle source
> return ex and cache
# File lib/try-catch/syntax.rb, line 7 def __try__ *exception_classes, &block ::TryCatch::Function.try( self, *exception_classes, &block ) end
__try_nc__(*exception_classes, &block)
click to toggle source
> return ex but not cache
# File lib/try-catch/syntax.rb, line 12 def __try_nc__ *exception_classes, &block ::TryCatch::Function.try_no_cache( *exception_classes, &block ) end
__try_nil__(*exception_classes, &block)
click to toggle source
> return nil if fail
# File lib/try-catch/syntax.rb, line 17 def __try_nil__ *exception_classes, &block ::TryCatch::Function.try?( *exception_classes, &block ) end
Also aliased as: __try_n__