File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,13 @@ extension Express: CustomStringConvertible {
296296
297297}
298298
299+ /**
300+ * If the done closure is called w/ arguments, the first one is considered
301+ * the error and the second one the result.
302+ *
303+ * I.e. to report an error: done(myError)
304+ * To report a result: done(nil, myValue)
305+ */
299306public typealias ExpressEngine = (
300307 _ path: String ,
301308 _ options: Any ? ,
Original file line number Diff line number Diff line change 11//
22// Mustache.swift
3- // Noze.io / Macro
3+ // Noze.io / MacroExpress
44//
55// Created by Helge Heß on 02/06/16.
6- // Copyright © 2016-2024 ZeeZide GmbH. All rights reserved.
6+ // Copyright © 2016-2025 ZeeZide GmbH. All rights reserved.
77//
88
99import func fs. readFile
@@ -14,8 +14,8 @@ import Mustache
1414
1515let mustacheExpress : ExpressEngine = { path, options, done in
1616 fs. readFile ( path, " utf8 " ) { err, str in
17- guard err == nil else {
18- done ( err! )
17+ if let error = err {
18+ done ( err)
1919 return
2020 }
2121
You can’t perform that action at this time.
0 commit comments