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 { do {
let template = Template(named: "template.stencil") let template = try Template(named: "template.stencil")
let rendered = template.render(context) let rendered = try template.render(context)
print(rendered) print(rendered)
} catch { } catch {
print("Failed to render template \(error)") print("Failed to render template \(error)")