lib/arxutils_sqlite3/dbutil/dbconnect.rb in arxutils_sqlite3-0.1.49 vs lib/arxutils_sqlite3/dbutil/dbconnect.rb in arxutils_sqlite3-0.1.50

- old
+ new

@@ -4,32 +4,10 @@ require "yaml" require "active_record" require "sqlite3" require "ykxutils" -def require_x(path) - require path -rescue StandardError => e - p "1 request_x" - p e -rescue LoadError => e - p "21 request_x" - p e -rescue NotImplementedError => e - p "22 request_x" - p e -rescue SyntaxError => e - p "23 request_x" - p e -rescue ScriptError => e - p "20 request_x" - p e -rescue Exception => e - p "9 request_x" - p e -end - module Arxutils_Sqlite3 module Dbutil # DB操作用ユーティリティクラス class Dbconnect def self.make_log_file_name(dbconfig, log_file_base_name) @@ -62,17 +40,17 @@ # DB接続、DB用ログファイルの設定 def connect unless @connect_time begin - #p "@dbconfig_dest_path=#{@dbconfig_dest_path}" + # p "@dbconfig_dest_path=#{@dbconfig_dest_path}" dbconfig = Ykxutils.yaml_load_file_compati(@dbconfig_dest_path) - #p "dbconfig=#{dbconfig}" - #p "@env=#{@env}" + # p "dbconfig=#{dbconfig}" + # p "@env=#{@env}" ActiveRecord::Base.establish_connection(dbconfig[@env]) ActiveRecord::Base.logger = Logger.new(@log_path) @connect_time = DateTime.now.new_offset - rescue => ex + rescue StandardError => ex p ex.message end end @connect_time end