mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Return error instead of panicking
This commit is contained in:
parent
ee36691f3f
commit
7bda89e79d
1 changed files with 1 additions and 3 deletions
|
|
@ -87,9 +87,7 @@ func SetChecksums(ctx context.Context, entities <-chan contracts.Entity, checksu
|
|||
if checksumer, ok := checksums[entity.ID().String()]; ok {
|
||||
entity.(contracts.Checksumer).SetChecksum(checksumer.(contracts.Checksumer).Checksum())
|
||||
} else {
|
||||
panic("no checksum")
|
||||
// TODO(el): Error is not published
|
||||
//return errors.New("no checksum")
|
||||
return errors.Errorf("no checksum for %#v", entity)
|
||||
}
|
||||
|
||||
select {
|
||||
|
|
|
|||
Loading…
Reference in a new issue