1 // Copyright 2022-present 650 Industries. All rights reserved. 2 3 /** 4 Represents the place in code where the exception was created. 5 */ 6 public struct ExceptionOrigin: CustomStringConvertible { 7 /** 8 The path to the file in which the exception was created. 9 */ 10 let file: String 11 12 /** 13 The line number on which the exception was created. 14 */ 15 let line: UInt 16 17 /** 18 The name (selector) of the declaration in which the exception was created. 19 */ 20 let function: String 21 22 /** 23 Stringified representation of the exception origin. 24 */ 25 public var description: String { 26 "at \(file):\(line) in \(function)" 27 } 28 } 29