Skip to content

Commit 049f1e2

Browse files
committed
Make OptionError’s initializer public. Implement CustomStringConvertible.
1 parent 2bd6ee0 commit 049f1e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

OptionParser/OptionParser.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
// This file is part of OptionParser: https://github.com/lorentey/OptionParser
33
// For licensing information, see the file LICENSE.md in the Git repository above.
44

5-
public struct OptionError: Error {
6-
let message: String
5+
public struct OptionError: Error, CustomStringConvertible {
6+
public let message: String
77

8-
init(_ message: String) {
8+
public init(_ message: String) {
99
self.message = message
1010
}
11+
12+
public var description: String { return message }
1113
}
1214

1315
public struct OptionParser<Record> {

0 commit comments

Comments
 (0)