Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Consolidate Debuggable.stackTrace with the rest of the error types #182

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/Debugging/Debuggable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public protocol Debuggable: CustomDebugStringConvertible, CustomStringConvertibl
var sourceLocation: SourceLocation? { get }

/// Stack trace from which this error originated (must set this from the error's init)
var stackTrace: [String]? { get }
var stackTrace: [String] { get }

/// A `String` array describing the possible causes of the error.
/// - note: Defaults to an empty array.
Expand Down Expand Up @@ -117,8 +117,8 @@ extension Debuggable {
}

/// See `Debuggable`
public var stackTrace: [String]? {
return nil
public var stackTrace: [String] {
return []
}
}

Expand Down