Skip to content

Commit aec7575

Browse files
committed
Print search location
1 parent f89612e commit aec7575

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Sources/Compiler/Config.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ public struct Config: Codable {
1717
public let tableNamePattern: String?
1818

1919
struct NotFoundError: Error, CustomStringConvertible {
20-
var description: String { "Config does not exist" }
20+
let searchURL: URL
21+
22+
var description: String {
23+
"Config does not exist in \(searchURL.absoluteString)"
24+
}
2125
}
2226

2327
public init(at path: String) throws {
@@ -28,7 +32,7 @@ public struct Config: Codable {
2832
}
2933

3034
guard FileManager.default.fileExists(atPath: url.path) else {
31-
throw NotFoundError()
35+
throw NotFoundError(searchURL: url)
3236
}
3337

3438
let data = try Data(contentsOf: url)

0 commit comments

Comments
 (0)