Sha256: 38ea319e9491f3a039ac7debaf159186977b39de682f1ee4eb29c1ffee91c2bc
Contents?: true
Size: 1021 Bytes
Versions: 1
Compression:
Stored size: 1021 Bytes
Contents
require "yaml" module Ykxutils module_function def yaml_load_file_compati(yaml_file_path) setting = {} valid = false begin setting = YAML.load_file(yaml_file_path, aliases: true) valid = true rescue ArgumentError => e # p "yaml_load_file_compat 1" # p ex.class # p ex.inspect # p ex.message # p ex.backtrace # exit# rescue StandardError => e # p "yaml_load_file_compat 1-2" # p ex.class # p ex.inspect # p ex.message # p ex.backtrace end if valid != true begin setting = YAML.load_file(yaml_file_path) valid = true rescue ArgumentError # p "yaml_load_file_compat 2" # p ex.class # p ex.inspect # p ex.message # p ex.backtrace # rescue StandardError => e # p "yaml_load_file_compat 2-2" # p ex.class # p ex.inspect # p ex.message # p ex.backtrace end end setting end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ykxutils-0.1.4 | lib/ykxutils/yamlx.rb |