forked from MTSR/mapserver
don't panic, log errors
This commit is contained in:
parent
f3935f786c
commit
9be625fae4
@ -128,6 +128,13 @@ func (tr *TileRenderer) renderImage(tc *coords.TileCoords, recursionDepth int) (
|
||||
img, err := tr.mapblockrenderer.Render(mbr.Pos1, mbr.Pos2)
|
||||
|
||||
if err != nil {
|
||||
fields := logrus.Fields{
|
||||
"pos1": mbr.Pos1,
|
||||
"pos2": mbr.Pos2,
|
||||
"err": err,
|
||||
}
|
||||
log.WithFields(fields).Debug("mapblock render from tilerender")
|
||||
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package tilerenderer
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
"mapserver/colormapping"
|
||||
"mapserver/coords"
|
||||
@ -14,7 +15,6 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func TestTileRender(t *testing.T) {
|
||||
|
@ -57,7 +57,6 @@ func initialRender(ctx *app.App) {
|
||||
}
|
||||
logrus.WithFields(fields).Info("Initial rendering")
|
||||
|
||||
|
||||
//tile gc
|
||||
ctx.TileDB.GC()
|
||||
|
||||
|
@ -21,7 +21,15 @@ func worker(ctx *app.App, coords <-chan *coords.TileCoords, done chan bool) {
|
||||
|
||||
_, err := ctx.Tilerenderer.Render(tc)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
fields := logrus.Fields{
|
||||
"X": tc.X,
|
||||
"Y": tc.Y,
|
||||
"Zoom": tc.Zoom,
|
||||
"LayerId": tc.LayerId,
|
||||
"prefix": "tilerenderjob",
|
||||
"err": err,
|
||||
}
|
||||
logrus.WithFields(fields).Error("Tile render job tile")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user