Skip to content

Commit

Permalink
Replaced error code with the corresponding constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdoe committed Apr 10, 2024
1 parent da1c38a commit 6f0bf9f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CCMenu/Source/Model/PipelineDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ struct PipelineDocument: FileDocument {
}

init(url: URL) throws {
// TODO: Check whether this is really the best error to throw
guard url.startAccessingSecurityScopedResource() else { throw NSError(domain: NSCocoaErrorDomain, code: 257) }
guard url.startAccessingSecurityScopedResource() else { throw NSError(domain: NSCocoaErrorDomain, code: NSFileReadNoPermissionError) }
defer { url.stopAccessingSecurityScopedResource() }
let data = try Data(contentsOf: url)
let decoder = JSONDecoder()
Expand Down

0 comments on commit 6f0bf9f

Please sign in to comment.