From bf2b0f49e64d78abf44da4637913064509578e57 Mon Sep 17 00:00:00 2001 From: Athitya Date: Wed, 9 Aug 2017 04:40:14 +0530 Subject: [PATCH] Comments RException class --- lib/rsruby.rb | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/rsruby.rb b/lib/rsruby.rb index 34641e4..1ff31b8 100644 --- a/lib/rsruby.rb +++ b/lib/rsruby.rb @@ -298,23 +298,23 @@ def __getitem__(name,init=false) end -class RException < RuntimeError - def initialize(_msg) - e = RSRuby.get_default_mode - RSRuby.set_default_mode(RSRuby::VECTOR_CONVERSION ) - if RSRuby.instance.exists('traceback.character')[0] - @r_traceback = RSRuby.instance.traceback_character('max.lines'=>10) - else - r_full_traceback = RSRuby.instance.get(".Traceback") - r_shortened_traceback = r_full_traceback.map{|x| x.first(10)} - @r_traceback = r_shortened_traceback.flatten - end - RSRuby.set_default_mode(e) - super - end - def backtrace - x = super - return x if x.nil? - @r_traceback +x - end -end +#class RException < RuntimeError +# def initialize(_msg) +# e = RSRuby.get_default_mode +# RSRuby.set_default_mode(RSRuby::VECTOR_CONVERSION ) +# if RSRuby.instance.exists('traceback.character')[0] +# @r_traceback = RSRuby.instance.traceback_character('max.lines'=>10) +# else +# r_full_traceback = RSRuby.instance.get(".Traceback") +# r_shortened_traceback = r_full_traceback.map{|x| x.first(10)} +# @r_traceback = r_shortened_traceback.flatten +# end +# RSRuby.set_default_mode(e) +# super +# end +# def backtrace +# x = super +# return x if x.nil? +# @r_traceback +x +# end +#end