mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
* Resolves #173 - Shared breakpoints support * Added breakpoints full documentation * Invalid breakpoint just throw JSONUtilities decoding error. * Use enumeration types instead of String for extensionIDs * Remove a necessary line * Remove unnecessary custom Equatable implementation * Update CHANGELOG.md * Ignore empty breakpoints * Update Docs/ProjectSpec.md Fix a typo Co-Authored-By: Yonas Kolb <yonaskolb@users.noreply.github.com> * Change some properties that should be Int to Int * Create 2 typealiases * Use BreakpointType where it is missing * Remove unused Location * Change some names * Add Breakpoint.Scope * Add Breakpoint.StopOnStyle * Change the type of the raw value to String * Remove some properties that may cause confusing * Require filePah and line when the type is .file * Add tests about decoding breakpoints * Add Breakpoint.Action.ConveyanceType * Add default value for waitUntilDone * Add Breakpoint.Action.SoundName * Add tests about decoding breakpoint actions * Fix some issues in ProjectSpec.md * Improve ProjectSpec.md * Add missing condition * Add breakpoints to project.yml * Use unwarp * Remove the Breakpoint suffix * Refactor BreakpointType * Refactor Breakpoint.Action * Remove unnecessary properties * Adjust the line wrapping style for BreakpointGenerator * Support column breakpoints --------- Co-authored-by: Alex Rupérez <alejandro.ruperez@intelygenz.com> Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
49 lines
2.1 KiB
Swift
49 lines
2.1 KiB
Swift
import Foundation
|
|
|
|
public enum SpecParsingError: Error, CustomStringConvertible {
|
|
case unknownTargetType(String)
|
|
case unknownTargetPlatform(String)
|
|
case invalidDependency([String: Any])
|
|
case unknownPackageRequirement([String: Any])
|
|
case invalidSourceBuildPhase(String)
|
|
case invalidTargetReference(String)
|
|
case invalidVersion(String)
|
|
case unknownBreakpointType(String)
|
|
case unknownBreakpointScope(String)
|
|
case unknownBreakpointStopOnStyle(String)
|
|
case unknownBreakpointActionType(String)
|
|
case unknownBreakpointActionConveyanceType(String)
|
|
case unknownBreakpointActionSoundName(String)
|
|
|
|
public var description: String {
|
|
switch self {
|
|
case let .unknownTargetType(type):
|
|
return "Unknown Target type: \(type)"
|
|
case let .unknownTargetPlatform(platform):
|
|
return "Unknown Target platform: \(platform)"
|
|
case let .invalidDependency(dependency):
|
|
return "Unknown Target dependency: \(dependency)"
|
|
case let .invalidSourceBuildPhase(error):
|
|
return "Invalid Source Build Phase: \(error)"
|
|
case let .invalidTargetReference(targetReference):
|
|
return "Invalid Target Reference Syntax: \(targetReference)"
|
|
case let .invalidVersion(version):
|
|
return "Invalid version: \(version)"
|
|
case let .unknownPackageRequirement(package):
|
|
return "Unknown package requirement: \(package)"
|
|
case let .unknownBreakpointType(type):
|
|
return "Unknown Breakpoint type: \(type)"
|
|
case let .unknownBreakpointScope(scope):
|
|
return "Unknown Breakpoint scope: \(scope)"
|
|
case let .unknownBreakpointStopOnStyle(stopOnStyle):
|
|
return "Unknown Breakpoint stopOnStyle: \(stopOnStyle)"
|
|
case let .unknownBreakpointActionType(type):
|
|
return "Unknown Breakpoint Action type: \(type)"
|
|
case let .unknownBreakpointActionConveyanceType(type):
|
|
return "Unknown Breakpoint Action conveyance type: \(type)"
|
|
case let .unknownBreakpointActionSoundName(name):
|
|
return "Unknown Breakpoint Action sound name: \(name)"
|
|
}
|
|
}
|
|
}
|