Commits

Christian Specht committed 24da78a

wait for user input after displaying error messages

Comments (0)

Files changed (4)

src/BitbucketBackup/Program.cs

                 if (response == string.Empty)
                 {
                     Console.WriteLine(Resources.NoResponse, resource);
+                    Console.WriteLine();
+                    Console.WriteLine(Resources.PressEnter);
                     Console.ReadLine();
                     return;
                 }
 
                 Console.WriteLine();
                 Console.WriteLine(Resources.BackupCompleted);
+                Thread.Sleep(sleepTime);
             }
             catch (ClientException ex)
             {
                 Console.WriteLine(Resources.ClientExceptionHeadline);
                 Console.WriteLine(ex.Message);
-            }
-            finally
-            {
-                Thread.Sleep(sleepTime);
+                Console.WriteLine();
+                Console.WriteLine(Resources.PressEnter);
+                Console.ReadLine();
             }
         }
     }

src/BitbucketBackup/Resources.Designer.cs

         }
         
         /// <summary>
+        ///   Sucht eine lokalisierte Zeichenfolge, die Press &lt;ENTER&gt; to quit! ähnelt.
+        /// </summary>
+        internal static string PressEnter {
+            get {
+                return ResourceManager.GetString("PressEnter", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Sucht eine lokalisierte Zeichenfolge, die Pulling: {0} ähnelt.
         /// </summary>
         internal static string Pulling {

src/BitbucketBackup/Resources.de.resx

   <data name="NoResponse" xml:space="preserve">
     <value>Die Bitbucket-API hat keine Antwort zurückgegeben: {0}</value>
   </data>
+  <data name="PressEnter" xml:space="preserve">
+    <value>Drücken sie &lt;ENTER&gt;, um das Programm zu beenden!</value>
+  </data>
   <data name="Pulling" xml:space="preserve">
     <value>Pull: {0}</value>
   </data>

src/BitbucketBackup/Resources.resx

     <value>Couldn't load information for user: {0}
 Please check if the user name is valid!</value>
   </data>
+  <data name="PressEnter" xml:space="preserve">
+    <value>Press &lt;ENTER&gt; to quit!</value>
+  </data>
 </root>