Skip to content

Commit 83dd2eb

Browse files
committed
Feedback
1 parent 0cfda35 commit 83dd2eb

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ public enum ModuleOutput: Equatable {
4141

4242
/// The Swift driver.
4343
public struct Driver {
44-
public enum Error: Swift.Error, LocalizedError {
44+
public enum Error: Swift.Error, DiagnosticData {
4545
case invalidDriverName(String)
4646
case invalidInput(String)
4747
case noJobsPassedToDriverFromEmptyInputFileList
4848
case relativeFrontendPath(String)
4949
case subcommandPassedToDriver
5050

51-
public var errorDescription: String? {
51+
public var description: String {
5252
switch self {
5353
case .invalidDriverName(let driverName):
54-
return "invalid drive name: \(driverName)"
54+
return "invalid driver name: \(driverName)"
5555
case .invalidInput(let input):
5656
return "invalid input: \(input)"
5757
case .noJobsPassedToDriverFromEmptyInputFileList:
58-
return "no input files were passed and no subsequent jobs were generated for the driver"
58+
return "no input files"
5959
case .relativeFrontendPath(let path):
6060
// TODO: where is this error thrown
6161
return "relative frontend path: \(path)"
@@ -589,7 +589,7 @@ extension Driver {
589589
switch driverName {
590590
case "swift":
591591
return .interactive
592-
case "swiftc", "swift-driver":
592+
case "swiftc":
593593
return .batch
594594
case "swift-autolink-extract":
595595
return .autolinkExtract

Sources/swift-driver/main.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ do {
5252
exit(EXIT_FAILURE)
5353
} catch let diagnosticData as DiagnosticData {
5454
diagnosticsEngine.emit(.error(diagnosticData))
55-
} catch let driverError as Driver.Error {
56-
print("error: \(driverError.localizedDescription)")
57-
exit(EXIT_FAILURE)
5855
} catch {
5956
print("error: \(error)")
6057
exit(EXIT_FAILURE)

0 commit comments

Comments
 (0)