Method: Exception#exception

Defined in:
lib/source/ruby.rb

#exception(arg) ⇒ Object

call-seq:

exc.exception(arg) -> exception or exc

If arg is absent or equal to exc, returns the receiver. Otherwise returns a new Exception object of the same class as the receiver, but with a message equal to arg.to_str.



2894
2895
2896
2897
# File 'lib/source/ruby.rb', line 2894

def exception(arg)
  `if(arg==null||arg==this){return this;}`
  `this.m$class().m$new(arg.m$toStr())`
end