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 {
296
296
297
297
}
298
298
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
+ */
299
306
public typealias ExpressEngine = (
300
307
_ path: String ,
301
308
_ options: Any ? ,
Original file line number Diff line number Diff line change 1
1
//
2
2
// Mustache.swift
3
- // Noze.io / Macro
3
+ // Noze.io / MacroExpress
4
4
//
5
5
// 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.
7
7
//
8
8
9
9
import func fs. readFile
@@ -14,8 +14,8 @@ import Mustache
14
14
15
15
let mustacheExpress : ExpressEngine = { path, options, done in
16
16
fs. readFile ( path, " utf8 " ) { err, str in
17
- guard err == nil else {
18
- done ( err! )
17
+ if let error = err {
18
+ done ( err)
19
19
return
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments