0001    //
0002    //  Errors.swift
0003    //  SourceKitten
0004    //
0005    //  Created by JP Simard on 2015-01-15.
0006    //  Copyright (c) 2015 SourceKitten. All rights reserved.
0007    //
0008    
0009    /// Possible errors within SourceKitten.
0010    enum SourceKittenError
main.swift:16
    let registry = CommandRegistry<SourceKittenError>()
: ErrorType, CustomStringConvertible { 0011 /// One or more argument was invalid. 0012 case InvalidArgument
Errors_.swift:23
        case let .InvalidArgument(description):
(description: String) 0013 0014 /// Failed to read a file at the given path. 0015 case ReadFailed
Errors_.swift:25
        case let .ReadFailed(path):
(path: String) 0016 0017 /// Failed to generate documentation. 0018 case DocFailed
Errors_.swift:27
        case .DocFailed:
0019 0020 /// An error message corresponding to this error. 0021 var description: String { 0022 switch self { 0023 case let .InvalidArgument(description): 0024 return description 0025 case let .ReadFailed(path): 0026 return "Failed to read file at '\(path)'" 0027 case .DocFailed: 0028 return "Failed to generate documentation" 0029 } 0030 } 0031 } 0032