// Panic logs the args at the Error level and panics.
353659
func (entry *Entry) Panic(args ...interface{}) {
	entry.WithField(errorLevelKey, "panic").Entry.Error(args...)
	safeRollbarWait(time.Second)
	panic(fmt.Sprint(args...))
}
44441
func Panicln(v ...interface{}) {
	s := fmt.Sprintln(v...)
	log.Output(2, s)
	panic(s)
}
652512
func panicHandler(handler http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		defer func() {
			if err := recover(); err != nil {
				log.Panic(fmt.Sprintf("%v", err))
			}
		}()
		handler.ServeHTTP(w, r)
	})
}
502964
func (e Error) Panicf(args ...interface{}) {
	_, fn, line, _ := runtime.Caller(1)
	errMsg := e.Format(args...).Error()
	errMsg += "\nCaller was: " + fmt.Sprintf("%s:%d", fn, line)
	panic(errMsg)
}
489562
func (l *Logger) Panicln(v ...interface{}) {
	if l.Level >= PanicLevel {
		l.Logger.Panicln(PanicLevel.String() + fmt.Sprint(v...))
	}
}
1303352
func (a *Assertion) PanicString(fn func(), str string, msg ...interface{}) *Assertion {
	PanicString(a.t, fn, str, msg...)
	return a
}
211539
func PanicIfErr(err error, msg string, args ...interface{}) {
	if err != nil {
		panic(fmt.Sprintf("%s: %s", err.Error(), fmt.Sprintf(msg, args...)))
	}
}
329042
func (l *Slog) Panicf(s string, v ...interface{}) {
	l = l.copy()
	l.Log.di(fnLevelDi)
	msg := fmt.Sprintf(s, v...)
	l.Log.Message(msg)
	l.Log.Priority = PanicPrio
	l.commit()
	l.Writter.Close()
	panic(msg)
}
52817
func (l *Logger) Panic(v interface{}) {
	s := format(v)
	l.Emerg(s)
	panic(s)
}
1325428
func Panic(err error, msgs ...string) {
	if err != nil {
		if len(msgs) > 0 {
			panic(strings.Join(msgs, ",") + err.Error())
		} else {
			panic(err)
		}
	}
}
480410
func (l *Logger) Panicln(v ...interface{}) {
	l.Fprint(l.flags, LEVEL_CRITICAL, 2, fmt.Sprintln(v...), nil)
	panic(v)
}
813633
func (logger *Logger) Error(args ...interface{}) {
	if logger.std.Level >= lg.ErrorLevel {
		logger.header(1).Error(args...)
	}
}
915588
func (l *Slog) Panic(v ...interface{}) {
	l = l.copy()
	l.Log.di(fnLevelDi)
	msg := fmt.Sprint(v...)
	l.Log.Message(msg)
	l.Log.Priority = PanicPrio
	l.commit()
	l.Writter.Close()
	panic(msg)
}
1127515
func (e Entry) Panicf(s string, v ...interface{}) {
	e.Message = fmt.Sprintf(s, v...)
	e.Level = PanicLevel
	HandleEntry(e)
	exitFunc(1)
}
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
}
324113
func (logs *Logs) Panicf(format string, v ...interface{}) {
	logs.allf(format, v...)
	logs.Flush()
	panic(fmt.Sprintf(format, v...))
}
35658
func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
	Panics(a.t, f, msgAndArgs...)
}