From 2c90c94c655911eb5f2f7398202caca575942ae3 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 20 Jan 2022 21:04:12 +0100 Subject: [PATCH] don't panic (just print the error and move along) fixes #233 --- mapblockaccessor/legacyblocks.go | 2 +- tilerendererjob/initial.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mapblockaccessor/legacyblocks.go b/mapblockaccessor/legacyblocks.go index 597f29c..cafff53 100644 --- a/mapblockaccessor/legacyblocks.go +++ b/mapblockaccessor/legacyblocks.go @@ -54,7 +54,7 @@ func (a *MapBlockAccessor) FindNextLegacyBlocks(s settings.Settings, layers []*l "z": block.Pos.Z, "err": err, } - logrus.WithFields(fields).Error("mapblock-pars") + logrus.WithFields(fields).Error("mapblock-parse") return nil, err } diff --git a/tilerendererjob/initial.go b/tilerendererjob/initial.go index 47546af..de0ac08 100644 --- a/tilerendererjob/initial.go +++ b/tilerendererjob/initial.go @@ -21,7 +21,8 @@ func initialRender(ctx *app.App) { result, err := ctx.MapBlockAccessor.FindNextLegacyBlocks(ctx.Settings, ctx.Config.Layers, ctx.Config.RenderingFetchLimit) if err != nil { - panic(err) + logrus.Error("Error in initial rendering run, trying to continue: " + err.Error()) + continue } if len(result.List) == 0 && !result.HasMore {