File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
swift/example_code/ec2/scenario/Sources Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,8 @@ class Example {
427427 return nil
428428 }
429429
430+ // Build the URL of the temporary private key file.
431+
430432 let fileURL = URL . temporaryDirectory
431433 . appendingPathComponent ( name)
432434 . appendingPathExtension ( " pem " )
@@ -435,9 +437,11 @@ class Example {
435437 try keyMaterial. write ( to: fileURL, atomically: true , encoding: String . Encoding. utf8)
436438 return fileURL
437439 } catch {
440+ print ( " *** Failed to write the private key. " )
438441 return nil
439442 }
440443 } catch {
444+ print ( " *** Unable to create the key pair. " )
441445 return nil
442446 }
443447 }
@@ -894,7 +898,7 @@ class Example {
894898 print ( " Getting the IP address... " )
895899 return try String ( contentsOf: url, encoding: String . Encoding. utf8) . trim ( )
896900 } catch {
897- print ( " Got an error! " )
901+ print ( " *** Unable to get your public IP address. " )
898902 return nil
899903 }
900904 }
You can’t perform that action at this time.
0 commit comments