{"record":{"id":"22f6a81dcc7a5c01","repo":"fluent/fluentd","slug":"ex-class-ex-message","errorCode":null,"errorMessage":"#{ex.class}: #{ex.message}","messagePattern":"#\\{ex\\.class\\}: #\\{ex\\.message\\}","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/in_sample.rb","lineNumber":53,"sourceCode":"    desc \"The number of events in event stream of each emits.\"\n    config_param :size, :integer, default: 1\n    desc \"It configures how many events to generate per second.\"\n    config_param :rate, :integer, default: 1\n    desc \"If specified, each generated event has an auto-incremented key field.\"\n    config_param :auto_increment_key, :string, default: nil\n    desc \"The boolean to suspend-and-resume incremental value after restart\"\n    config_param :suspend, :bool, default: false,deprecated: 'This parameters is ignored'\n    desc \"Reuse the sample data to reduce the load when sending large amounts of data. You can enable it if filter does not do destructive change\"\n    config_param :reuse_record, :bool, default: false\n    desc \"The sample data to be generated. An array of JSON hashes or a single JSON hash.\"\n    config_param :sample, alias: :dummy, default: [{\"message\" => \"sample\"}] do |val|\n      begin\n        parsed = JSON.parse(val, Fluent::DEFAULT_JSON_PARSE_OPTIONS)\n      rescue JSON::ParserError => ex\n        # Fluent::ConfigParseError, \"got incomplete JSON\" will be raised\n        # at literal_parser.rb with --use-v1-config, but I had to\n        # take care at here for the case of --use-v0-config.\n        raise Fluent::ConfigError, \"#{ex.class}: #{ex.message}\"\n      end\n      sample = parsed.is_a?(Array) ? parsed : [parsed]\n      sample.each_with_index do |e, i|\n        raise Fluent::ConfigError, \"#{i}th element of sample, #{e}, is not a hash\" unless e.is_a?(Hash)\n      end\n      sample\n    end\n\n    def initialize\n      super\n      @storage = nil\n    end\n\n    def configure(conf)\n      super\n      @sample_index = 0\n      config = conf.elements.find{|e| e.name == 'storage' }\n      @storage = storage_create(usage: 'suspend', conf: config, default_type: DEFAULT_STORAGE_TYPE)","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/in_sample.rb#L35-L71","documentation":"Error \"#{ex.class}: #{ex.message}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/plugin/in_sample.rb:53 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":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}