lib/rrj/tools/gem/config.rb in ruby_rabbitmq_janus-2.2.0.pre.42 vs lib/rrj/tools/gem/config.rb in ruby_rabbitmq_janus-2.2.0.pre.159
- old
+ new
@@ -33,12 +33,10 @@
def initialize
@options = @configuration = nil
loading_configuration_customize
loading_configuration_default
Tools::Log.instance.save_level(log_level)
- rescue
- raise Errors::Tools::Config::Initialize
end
# Get to name queue_from (pattern)
#
# @return [String] read configuration for queue `from`
@@ -77,24 +75,24 @@
# @return [Symbol] read configuration for log level used in this gem
def log_level
@options['gem']['log']['level'].upcase.to_sym || :INFO
rescue
- raise Errors::Tools::Config::LevelNotDefine
+ raise Errors::Tools::Config::LogLevel
end
def log_level_rabbit
@options['rabbit']['level'].upcase.to_sym || :INFO
rescue
- raise Errors::Tools::Config::LevelNotDefine
+ raise Errors::Tools::Config::LogLevelRabbit
end
# @return [Integer]
# read configuration for janus time to live for keepalive messages
def time_to_live
@options['janus']['session']['keepalive'].to_i || 50
rescue
- raise Errors::Tools::Config::TTLNotFound
+ raise Errors::Tools::Config::TimeToLive
end
alias ttl time_to_live
# @param [Fixnum] index determine what field is readint in array plugins