lib/cryptum.rb in cryptum-0.0.386 vs lib/cryptum.rb in cryptum-0.0.387

- old
+ new

@@ -35,42 +35,60 @@ require 'cryptum/version' require 'cryptum/web_sock' public_class_method def self.bin File.join root, 'bin' + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.etc File.join root, 'etc' + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.lib File.join root, 'lib' + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.order_book File.join root, 'order_book' + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.root File.dirname __dir__ + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.open_symbol "\u00f8" + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.up_arrow "\u2191" + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.down_arrow "\u2193" + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.flat_arrow '_' + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end # Add Commas to Large Numbers to Make it Easier to Read public_class_method def self.beautify_large_number(opts = {}) value = opts[:value].to_s @@ -86,15 +104,11 @@ beautify_whole = whole_num.reverse.scan(/.{1,3}/).join(',').reverse beautify_num = "#{beautify_whole}.#{fraction}" unless is_negative beautify_num = "-#{beautify_whole}.#{fraction}" if is_negative beautify_num - rescue Interrupt - # Exit Gracefully if CTRL+C is Pressed During Session - Cryptum.exit_gracefully(which_self: self) - rescue StandardError => e - # Produce a Stacktrace for anything else - raise e + rescue Interrupt, StandardError => e + Cryptum::Log.append(level: :error, msg: e, which_self: self) end public_class_method def self.help constants.sort end