// panicCommand reports invalid use of the Command type
771470
func panicCommand(format string, values ...interface{}) {
	e := commandError{fmt.Errorf(format, values...)}
	panic(e)
}
438969
func PanicFilter(c *Controller, fc []Filter) {
	defer func() {
		if err := recover(); err != nil {
			handleInvocationPanic(c, err)
		}
	}()
	fc[0](c, fc[1:])
}
1094646
func Panicf(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_CRITICAL, 2, fmt.Sprintf(format, v...), nil)
	panic(v)
}
570443
func panicOption(format string, values ...interface{}) {
	e := optionError{fmt.Errorf(format, values...)}
	panic(e)
}
358021
func Main(args []string) int {
	defer func() {
		if r := recover(); r != nil {
			buf := make([]byte, 4096)
			buf = buf[:runtime.Stack(buf, false)]
			logger.Criticalf("Unhandled panic: \n%v\n%s", r, buf)
			os.Exit(exit_panic)
		}
	}()

	ctx, err := cmd.DefaultContext()
	if err != nil {
		cmd.WriteError(os.Stderr, err)
		os.Exit(exit_err)
	}

	code := 1
	commandName := filepath.Base(args[0])
	switch commandName {
	case names.Jujud:
		code, err = jujuDMain(args, ctx)
	case names.JujuRun:
		lock, err := machinelock.New(machinelock.Config{
			AgentName:   "juju-run",
			Clock:       clock.WallClock,
			Logger:      loggo.GetLogger("juju.machinelock"),
			LogFilename: filepath.Join(cmdutil.LogDir, machinelock.Filename),
		})
		if err != nil {
			code = exit_err
		} else {
			run := &RunCommand{MachineLock: lock}
			code = cmd.Main(run, ctx, args[1:])
		}
	case names.JujuDumpLogs:
		code = cmd.Main(dumplogs.NewCommand(), ctx, args[1:])
	case names.JujuIntrospect:
		code = cmd.Main(&introspect.IntrospectCommand{}, ctx, args[1:])
	default:
		code, err = hookToolMain(commandName, ctx, args)
	}
	if err != nil {
		cmd.WriteError(ctx.Stderr, err)
	}
	return code
}
1108719
func (logs *Logs) Panic(v ...interface{}) {
	s := fmt.Sprint(v...)
	logs.all(s)
	logs.Flush()
	panic(s)
}
806380
func (c *context) Panic(format string, args ...interface{}) {
	c.logger.Panic(c.prefixFormat()+format, args...)
}
437804
func (p *PackageLogger) Panicf(format string, args ...interface{}) {
	s := fmt.Sprintf(format, args...)
	p.internalLog(calldepth, CRITICAL, s)
	panic(s)
}
1206368
func Panic(v ...interface{}) {
	std.Fprint(std.flags, LEVEL_CRITICAL, 2, fmt.Sprint(v...), nil)
	panic(v)
}
397767
func PanicHandler(h http.Handler, errH http.Handler) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		defer func() {
			if err := recover(); err != nil {
				if errH != nil {
					ew := &errResponseWriter{w, err}
					errH.ServeHTTP(ew, r)
				} else {
					http.Error(w, fmt.Sprintf("%s", err), http.StatusInternalServerError)
				}
			}
		}()

		// Call the protected handler
		h.ServeHTTP(w, r)
	}
}
580187
func Panicf(s string, v ...interface{}) {
	e := newEntryWithFields(logFields)
	e.Panicf(s, v...)
}
661709
func (rl *RevelLogger) Panicf(msg string, param ...interface{}) {
	rl.Panic(fmt.Sprintf(msg, param...))
}
790393
func (l *Logger) Panic() *Event {
	return l.newEvent(PanicLevel, func(msg string) { panic(msg) })
}
1038432
func Panicf(format string, v ...interface{}) {
	s := fmt.Sprintf(format, v...)
	_ = std.Output(FATAL, 4, s)
	panic(s)
}
1326032
func (l *Logger) Panic(v ...interface{}) {
	s := fmt.Sprint(v...)
	l.Emit(1, s, nil)
	panic(s)
}
923943
func parseCommandArguments(cmd *cobra.Command) string {
	if len(os.Args) == 0 {
		return ""
	}

	flags := ""
	parseFunc := func(flag *pflag.Flag, value string) error {
		flags = flags + " --" + flag.Name
		if set, ok := flag.Annotations["classified"]; !ok || len(set) == 0 {
			flags = flags + "=" + value
		} else {
			flags = flags + "=CLASSIFIED"
		}
		return nil
	}
	var err error
	err = cmd.Flags().ParseAll(os.Args[1:], parseFunc)
	if err != nil || !cmd.Flags().Parsed() {
		return ""
	}

	args := ""
	if arguments := cmd.Flags().Args(); len(arguments) > 0 {
		args = " " + strings.Join(arguments, " ")
	}

	base := filepath.Base(os.Args[0])
	return base + args + flags
}
1197501
func (l *Logger) Panicm(message string, v Map) {
	l.Emit(1, message, v)
	panic(message)
}