Commit 6cfaa4eb authored by scriptonist's avatar scriptonist

Added code to recover from a tiller pod crash in an event of template render failure

parent b372547a
......@@ -19,6 +19,7 @@ package engine
import (
"bytes"
"fmt"
"log"
"path"
"sort"
"strings"
......@@ -204,6 +205,11 @@ func (e *Engine) render(tpls map[string]renderable) (map[string]string, error) {
// The idea with this process is to make it possible for more complex templates
// to share common blocks, but to make the entire thing feel like a file-based
// template engine.
defer func() {
if err := recover(); err != nil {
log.Printf("rendering template failed: %v\n", err)
}
}()
t := template.New("gotpl")
if e.Strict {
t.Option("missingkey=error")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment