{"record":{"id":"4fdcb13df54e3171","repo":"sipeed/picoclaw","slug":"error-initializing-panic-log-w","errorCode":null,"errorMessage":"error initializing panic log: %w","messagePattern":"error initializing panic log: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/gateway/gateway.go","lineNumber":125,"sourceCode":"\t_ []providers.Message,\n\t_ []providers.ToolDefinition,\n\t_ string,\n\t_ map[string]any,\n) (*providers.LLMResponse, error) {\n\treturn nil, fmt.Errorf(\"%s\", p.reason)\n}\n\nfunc (p *startupBlockedProvider) GetDefaultModel() string {\n\treturn \"\"\n}\n\n// Run starts the gateway runtime using the configuration loaded from configPath.\nfunc Run(debug bool, homePath, configPath string, allowEmptyStartup bool) (runErr error) {\n\tstartedAt := time.Now()\n\tpanicPath := filepath.Join(homePath, logPath, panicFile)\n\tpanicFunc, err := logger.InitPanic(panicPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error initializing panic log: %w\", err)\n\t}\n\tdefer panicFunc()\n\n\tif err = logger.EnableFileLogging(filepath.Join(homePath, logPath, logFile)); err != nil {\n\t\tlogger.Fatal(fmt.Sprintf(\"error enabling file logging: %v\", err))\n\t}\n\tdefer logger.DisableFileLogging()\n\n\tif debug {\n\t\tlogger.SetLevel(logger.DEBUG)\n\t} else {\n\t\tlogger.SetLevelFromString(config.ResolveGatewayLogLevel(configPath))\n\t}\n\tdefer func() {\n\t\tif runErr != nil {\n\t\t\tlogger.ErrorCF(\"gateway\", \"Gateway startup failed\", map[string]any{\n\t\t\t\t\"config_path\": configPath,\n\t\t\t\t\"error\":       runErr.Error(),","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/gateway/gateway.go#L107-L143","documentation":"Error \"error initializing panic log: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/gateway/gateway.go:125 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":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}