forked from TrueCloudLab/frostfs-node
[#552] cmd/node: Implement error checker with details
Implement function `fatalOnErrDetails` similar to `fatalOnErr` but accepting string details that are written to log output. Use the function everywhere in application code without wrapping in an if-else statement. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
ead4513feb
commit
6b1916a529
3 changed files with 13 additions and 13 deletions
|
@ -22,9 +22,7 @@ func initGRPC(c *cfg) {
|
|||
|
||||
if c.cfgGRPC.tlsEnabled {
|
||||
creds, err := credentials.NewServerTLSFromFile(c.cfgGRPC.tlsCertFile, c.cfgGRPC.tlsKeyFile)
|
||||
if err != nil {
|
||||
fatalOnErr(fmt.Errorf("could not read credentionals from file: %w", err))
|
||||
}
|
||||
fatalOnErrDetails("could not read credentials from file", err)
|
||||
|
||||
serverOpts = append(serverOpts, grpc.Creds(creds))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue