Skip to content

Commit 2d5bdb0

Browse files
committed
[javakit] correct the description/toString of Throwable
1 parent 26732cd commit 2d5bdb0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/JavaKit/Exceptions/Throwable+Error.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
// Translate all Java Throwable instances in a Swift error.
16-
extension Throwable: Error {
16+
extension Throwable: Error, CustomStringConvertible {
17+
public var description: String {
18+
return toString()
19+
}
1720
}
1821

1922
extension JavaClass<Throwable> {

0 commit comments

Comments
 (0)