{"record":{"id":"6e548628fb06f4d2","repo":"RubyMoney/money","slug":"unknown-currency-id","errorCode":null,"errorMessage":"Unknown currency '#{id}'","messagePattern":"Unknown currency '#(.+?)'","errorType":"exception","errorClass":"Money::Currency::UnknownCurrency","httpStatus":null,"severity":"error","filePath":"lib/money/currency.rb","lineNumber":42,"sourceCode":"      def initialize(method, currency, attribute)\n        super(\n          \"Can't call Currency.#{method} - currency '#{currency}' is missing \" \\\n          \"the attribute '#{attribute}'\"\n        )\n      end\n    end\n\n    # Thrown when an unknown currency is requested.\n    class UnknownCurrency < ArgumentError; end\n\n    # Thrown when currency is not provided.\n    class NoCurrency < ArgumentError; end\n\n    class << self\n      def new(id)\n        id = id.to_s.downcase\n        unless stringified_keys.include?(id)\n          raise UnknownCurrency, \"Unknown currency '#{id}'\"\n        end\n\n        _instances[id] || @@mutex.synchronize { _instances[id] ||= super }\n      end\n\n      def _instances\n        @@instances\n      end\n\n      # Lookup a currency with given +id+ an returns a +Currency+ instance on\n      # success, +nil+ otherwise.\n      #\n      # @param [String, Symbol, #to_s] id Used to look into +table+ and\n      # retrieve the applicable attributes.\n      #\n      # @return [Money::Currency]\n      #\n      # @example","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/RubyMoney/money/blob/26e2829c34f165847040a5a40d4d2daa5eb72927/lib/money/currency.rb#L24-L60","documentation":"Error \"Unknown currency '#{id}'\" thrown in RubyMoney/money.","triggerScenarios":"Thrown at lib/money/currency.rb:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26e2829c34f165847040a5a40d4d2daa5eb72927","analyzedAt":"2026-08-23T17:41:07.306Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}