class Object

Constants

CatError1

CatError = Class.new(NoMemoryError)

DogError1

DogError = Class.new(SystemExit)

MyError1

MyError = Class.new(StandardError)

MyError2
MyError3
WhoError1

WhoError = Class.new(SignalException)

YouError1

YouError = Class.new(ScriptError)

YouError2
YouError3

Public Instance Methods

execute_process() click to toggle source
# File lib/tanraku.rb, line 115
def execute_process
  raise Object
rescue StandardError => e
  puts "#{e.class} : #{e.message}"
ensure
  puts ea.backtrace
end
tanraku() click to toggle source
# File lib/tanraku.rb, line 85
def tanraku
  m = Mutex.new

  begin
    m.lock
    raise Object
  rescue StandardError => e
    puts e.backtrace
    print 'Tanraku Method Exception '
  ensure
    puts '--> next class search...'
    m.unlock
  end
end
tanraku_exit() click to toggle source
# File lib/tanraku.rb, line 100
def tanraku_exit
  m2 = Mutex.new

  begin
    m2.lock
    raise Object
  rescue StandardError => ef
    puts ef.backtrace
  ensure
    puts '--> Tanraku_Exit Method Exception'
    m2.unlock
    exit!
  end
end
tanraku_log() click to toggle source
# File lib/tanraku.rb, line 123
def tanraku_log
  Dir.mkdir('log', 0o666) unless FileTest.exist?('log')
  File.open('log/logs.txt', 'a:utf-8') do |m2|
    exee = Exception.new('User Exception is raise message.')
    m2.puts exee.message
    raise
  rescue StandardError => e
    File.open('log/logs.txt', 'a:utf-8') do |m|
      m.puts e.backtrace.to_s
      m.puts "#{e.class} : #{e.message}"
    end
  ensure
    puts 'log write (log/logs.txt).'
  end
end