module Rafini::Exception
Public Instance Methods
puts(msg=nil)
click to toggle source
$!.puts outputs to standard error what went bang! The given message is what you normally want to see. The exeption message is also shown if in verbose mode. Backtrace is shown if in debug mode.
begin raise 'Ugly message' rescue RuntimeError # exact output depends on $VERBOSE and $DEBUG $!.puts('Nice message') end
# File lib/rafini/exception.rb, line 14 def puts(msg=nil) unless $VERBOSE.nil? warn msg if msg warn message if $VERBOSE || !msg warn backtrace.to_s if $DEBUG end end