@@ -69,7 +69,7 @@ public struct Linux: Platform {
6969 You can install the ca-certificates package on your system to fix this.
7070 """
7171
72- throw Error ( message: msg)
72+ throw SwiftlyError ( message: msg)
7373 }
7474 }
7575
@@ -258,7 +258,7 @@ public struct Linux: Platform {
258258 }
259259 msg += " \n " + Self. skipVerificationMessage
260260
261- throw Error ( message: msg)
261+ throw SwiftlyError ( message: msg)
262262 }
263263
264264 // Import the latest swift keys, but only once per session, which will help with the performance in tests
@@ -270,7 +270,7 @@ public struct Linux: Platform {
270270 }
271271
272272 guard let url = URL ( string: " https://www.swift.org/keys/all-keys.asc " ) else {
273- throw Error ( message: " malformed URL to the swift gpg keys " )
273+ throw SwiftlyError ( message: " malformed URL to the swift gpg keys " )
274274 }
275275
276276 try await httpClient. downloadFile ( url: url, to: tmpFile)
@@ -329,7 +329,7 @@ public struct Linux: Platform {
329329
330330 public func install( from tmpFile: URL , version: ToolchainVersion , verbose: Bool ) throws {
331331 guard tmpFile. fileExists ( ) else {
332- throw Error ( message: " \( tmpFile) doesn't exist " )
332+ throw SwiftlyError ( message: " \( tmpFile) doesn't exist " )
333333 }
334334
335335 if !self . swiftlyToolchainsDir. fileExists ( ) {
@@ -361,7 +361,7 @@ public struct Linux: Platform {
361361
362362 public func extractSwiftlyAndInstall( from archive: URL ) throws {
363363 guard archive. fileExists ( ) else {
364- throw Error ( message: " \( archive) doesn't exist " )
364+ throw SwiftlyError ( message: " \( archive) doesn't exist " )
365365 }
366366
367367 let tmpDir = self . getTempFilePath ( )
@@ -414,7 +414,7 @@ public struct Linux: Platform {
414414 do {
415415 try self . runProgram ( " gpg " , " --verify " , sigFile. path, archive. path, quiet: !verbose)
416416 } catch {
417- throw Error ( message: " Signature verification failed: \( error) . " )
417+ throw SwiftlyError ( message: " Signature verification failed: \( error) . " )
418418 }
419419 }
420420
@@ -471,7 +471,7 @@ public struct Linux: Platform {
471471 guard let releaseFile = releaseFile else {
472472 let message = " Unable to detect the type of Linux OS and the release "
473473 if disableConfirmation {
474- throw Error ( message: message)
474+ throw SwiftlyError ( message: message)
475475 } else {
476476 print ( message)
477477 }
@@ -498,7 +498,7 @@ public struct Linux: Platform {
498498 guard let id, let versionID else {
499499 let message = " Unable to find release information from file \( releaseFile) "
500500 if disableConfirmation {
501- throw Error ( message: message)
501+ throw SwiftlyError ( message: message)
502502 } else {
503503 print ( message)
504504 }
@@ -509,7 +509,7 @@ public struct Linux: Platform {
509509 guard versionID == " 2 " else {
510510 let message = " Unsupported version of Amazon Linux "
511511 if disableConfirmation {
512- throw Error ( message: message)
512+ throw SwiftlyError ( message: message)
513513 } else {
514514 print ( message)
515515 }
@@ -521,7 +521,7 @@ public struct Linux: Platform {
521521 guard versionID. hasPrefix ( " 9 " ) else {
522522 let message = " Unsupported version of RHEL "
523523 if disableConfirmation {
524- throw Error ( message: message)
524+ throw SwiftlyError ( message: message)
525525 } else {
526526 print ( message)
527527 }
@@ -535,7 +535,7 @@ public struct Linux: Platform {
535535
536536 let message = " Unsupported Linux platform "
537537 if disableConfirmation {
538- throw Error ( message: message)
538+ throw SwiftlyError ( message: message)
539539 } else {
540540 print ( message)
541541 }
0 commit comments