Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
6cfaa4eb
Commit
6cfaa4eb
authored
Mar 09, 2018
by
scriptonist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added code to recover from a tiller pod crash in an event of template render failure
parent
b372547a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
engine.go
pkg/engine/engine.go
+6
-0
No files found.
pkg/engine/engine.go
View file @
6cfaa4eb
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment