MCPcopy
hub / github.com/ethereum/go-ethereum / Fatalf

Function Fatalf

cmd/utils/cmd.go:68–83  ·  view source on GitHub ↗

Fatalf formats a message to standard error and exits the program. The message is also printed to standard output if standard error is redirected to a different file.

(format string, args ...interface{})

Source from the content-addressed store, hash-verified

66// The message is also printed to standard output if standard error
67// is redirected to a different file.
68func Fatalf(format string, args ...interface{}) {
69 w := io.MultiWriter(os.Stdout, os.Stderr)
70 if runtime.GOOS == "windows" || runtime.GOOS == "openbsd" {
71 // The SameFile check below doesn't work on Windows neither OpenBSD.
72 // stdout is unlikely to get redirected though, so just print there.
73 w = os.Stdout
74 } else {
75 outf, _ := os.Stdout.Stat()
76 errf, _ := os.Stderr.Stat()
77 if outf != nil && errf != nil && os.SameFile(outf, errf) {
78 w = os.Stderr
79 }
80 }
81 fmt.Fprintf(w, "Fatal: "+format+"\n", args...)
82 os.Exit(1)
83}
84
85func StartNode(ctx *cli.Context, stack *node.Node, isConsole bool) {
86 if err := stack.Start(); err != nil {

Callers 15

TestBindingGenerationFunction · 0.92
generateFunction · 0.92
makeRPCClientFunction · 0.92
confirmAndRemoveDBFunction · 0.92
remoteConsoleFunction · 0.92
ephemeralConsoleFunction · 0.92
initGenesisFunction · 0.92
dumpGenesisFunction · 0.92
importChainFunction · 0.92
exportChainFunction · 0.92
importHistoryFunction · 0.92
exportHistoryFunction · 0.92

Calls 2

ExitMethod · 0.80
StatMethod · 0.65

Tested by 1

TestBindingGenerationFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…