lib/rafini/exception.rb
# $!.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
$!.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
$! . 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
def puts(message=nil)
        unless $VERBOSE.nil? then
          $stderr.puts message if message
          $stderr.puts self.message if $VERBOSE or !message
          $stderr.puts self.backtrace.to_s if $DEBUG
        end
      end
def puts ( message = nil ) unless $VERBOSE . nil? then $stderr . puts message if message $stderr . puts self . message if $VERBOSE or ! message $stderr . puts self . backtrace . to_s if $DEBUG end end
$!.puts outputs to standard error what went bang!
$! . puts outputs to standard error what went bang!
message
<not_specific>