{"record":{"id":"233cd2309e606995","repo":"pry/pry","slug":"the-given-backtrace-level-is-out-of-bounds","errorCode":null,"errorMessage":"The given backtrace level is out of bounds.","messagePattern":"The given backtrace level is out of bounds\\.","errorType":"exception","errorClass":"Pry::CommandError","httpStatus":null,"severity":"error","filePath":"lib/pry/commands/cat/exception_formatter.rb","lineNumber":68,"sourceCode":"        end\n\n        def increment_backtrace_level\n          ex.inc_bt_index\n        end\n\n        def backtrace_file\n          Array(ex.bt_source_location_for(backtrace_level)).first\n        end\n\n        def backtrace_line\n          Array(ex.bt_source_location_for(backtrace_level)).last\n        end\n\n        def check_for_errors\n          raise CommandError, \"No exception found.\" unless ex\n          return if backtrace_file\n\n          raise CommandError, \"The given backtrace level is out of bounds.\"\n        end\n\n        def start_and_end_line_for_code_window\n          start_line = backtrace_line - code_window_size\n          start_line = 1 if start_line < 1\n\n          [start_line, backtrace_line + code_window_size]\n        end\n\n        def header\n          unindent(\n            \"#{bold 'Exception:'} #{ex.class}: #{ex.message}\\n\" \\\n            \"--\\n\" \\\n            \"#{bold('From:')} #{backtrace_file}:#{backtrace_line} @ \" \\\n            \"#{bold(\"level: #{backtrace_level}\")} of backtrace \" \\\n            \"(of #{ex.backtrace.size - 1}).\\n\\n\"\n          )\n        end","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/pry/pry/blob/135640262879544c6bfecbf3e78511289bfe956c/lib/pry/commands/cat/exception_formatter.rb#L50-L86","documentation":"Error \"The given backtrace level is out of bounds.\" thrown in pry/pry.","triggerScenarios":"Thrown at lib/pry/commands/cat/exception_formatter.rb:68 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":"135640262879544c6bfecbf3e78511289bfe956c","analyzedAt":"2026-08-21T19:07:03.985Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}