Added try to throwing expressions in example.

Both `Template(named: "template.stencil")` and `Template(named: "template.stencil")` throw but were not preceded by `try`. This usage example, in it's current form, triggers compiler errors.
This commit is contained in:
Dan Trenz
2016-02-27 15:20:55 -05:00
parent 9b7e6ba7ed
commit 2190afee0d

View File

@@ -25,8 +25,8 @@ let context = Context(dictionary: [
])
do {
let template = Template(named: "template.stencil")
let rendered = template.render(context)
let template = try Template(named: "template.stencil")
let rendered = try template.render(context)
print(rendered)
} catch {
print("Failed to render template \(error)")