Skip to content

Commit 0ffffd5

Browse files
committed
fix: removes extraneous things
Signed-off-by: Allain Magyar <[email protected]>
1 parent 50eb1db commit 0ffffd5

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

E2E/TestFramework/Errors/BaseError.swift

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,28 @@ import Foundation
33
open class BaseError: Error, LocalizedError, CustomStringConvertible {
44
public let file: StaticString
55
public let line: UInt
6-
7-
// Properties for LocalizedError conformance
6+
87
public var errorDescription: String?
98
public var failureReason: String?
10-
public var recoverySuggestion: String? // Optional
11-
public var helpAnchor: String? // Optional
12-
13-
// Store the original components for constructing descriptions
9+
public var recoverySuggestion: String?
10+
public var helpAnchor: String?
11+
1412
private let providedMessage: String
15-
private let errorTypeString: String // This was the 'error' parameter in your init
16-
17-
// This is for CustomStringConvertible.
18-
// XCTest might use this when an error is thrown out of a test method.
13+
private let errorTypeString: String
14+
1915
public var description: String {
20-
// We'll make this the same as errorDescription for consistency,
21-
// ensuring a detailed message is available.
2216
return self.errorDescription ?? "Undefined error: \(self.errorTypeString) - \(self.providedMessage)"
2317
}
24-
25-
// 'error' parameter here is a string describing the category or type of the error.
18+
2619
public init(message: String, error: String, file: StaticString = #file, line: UInt = #line) {
2720
self.file = file
2821
self.line = line
2922
self.providedMessage = message
3023
self.errorTypeString = error
31-
24+
3225
let fileName = URL(fileURLWithPath: String(describing: file)).lastPathComponent
3326

34-
// Populate LocalizedError properties
35-
// This self.errorDescription will be used by error.localizedDescription
3627
self.errorDescription = "\(self.errorTypeString): \(self.providedMessage) (at \(fileName):\(line))"
37-
3828
self.failureReason = "An issue occurred related to '\(self.errorTypeString)'."
3929
}
4030
}
41-
42-
// Your ConfigurationError.setup class remains the same:
43-
// open class ConfigurationError {
44-
// public final class setup: BaseError {
45-
// public init(message: String, file: StaticString = #file, line: UInt = #line) {
46-
// super.init(message: message, error: "Configuration error", file: file, line: line)
47-
// }
48-
// }
49-
// }

0 commit comments

Comments
 (0)