From 6e82717f3f43d5e05933e9016c84fc7108bda3cc Mon Sep 17 00:00:00 2001 From: campersau Date: Thu, 10 Jan 2019 23:57:28 +0100 Subject: [PATCH] add spaces in exception messages (#2620) --- CefSharp.Core/Cef.h | 8 ++++---- CefSharp.Example/Handlers/BrowserProcessHandler.cs | 4 ++-- CefSharp.OffScreen.Example/Program.cs | 2 +- CefSharp.OffScreen/ChromiumWebBrowser.cs | 4 ++-- CefSharp.WinForms.Example/Program.cs | 4 ++-- CefSharp.WinForms/ChromiumWebBrowser.cs | 8 ++++---- CefSharp.Wpf/ChromiumWebBrowser.cs | 8 ++++---- CefSharp/WebBrowserExtensions.cs | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h index 8c5bf3589..b16495a54 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core/Cef.h @@ -421,10 +421,10 @@ namespace CefSharp { if (_initializedThreadId != Thread::CurrentThread->ManagedThreadId) { - throw gcnew Exception("Cef.Shutdown must be called on the same thread that Cef.Initialize was called - typically your UI thread." + - "If you called Cef.Initialize on a Thread other than the UI thread then you will need to call Cef.Shutdown on the same thread." + - "Cef.Initialize was called on ManagedThreadId: " + _initializedThreadId + "where Cef.Shutdown is being called on" + - "ManagedThreadId:" + Thread::CurrentThread->ManagedThreadId); + throw gcnew Exception("Cef.Shutdown must be called on the same thread that Cef.Initialize was called - typically your UI thread. " + + "If you called Cef.Initialize on a Thread other than the UI thread then you will need to call Cef.Shutdown on the same thread. " + + "Cef.Initialize was called on ManagedThreadId: " + _initializedThreadId + "where Cef.Shutdown is being called on " + + "ManagedThreadId: " + Thread::CurrentThread->ManagedThreadId); } UIThreadTaskFactory = nullptr; diff --git a/CefSharp.Example/Handlers/BrowserProcessHandler.cs b/CefSharp.Example/Handlers/BrowserProcessHandler.cs index 3bfd138c0..d1a962147 100644 --- a/CefSharp.Example/Handlers/BrowserProcessHandler.cs +++ b/CefSharp.Example/Handlers/BrowserProcessHandler.cs @@ -37,7 +37,7 @@ namespace CefSharp.Example.Handlers foreach (var cookie in cookies) { - Debug.WriteLine("CookieName:" + cookie.Name); + Debug.WriteLine("CookieName: " + cookie.Name); } } else @@ -54,7 +54,7 @@ namespace CefSharp.Example.Handlers foreach (var cookie in cookies) { - Debug.WriteLine("CookieName:" + cookie.Name); + Debug.WriteLine("CookieName: " + cookie.Name); } } else diff --git a/CefSharp.OffScreen.Example/Program.cs b/CefSharp.OffScreen.Example/Program.cs index 56ef8ef9f..84adc7b1a 100644 --- a/CefSharp.OffScreen.Example/Program.cs +++ b/CefSharp.OffScreen.Example/Program.cs @@ -75,7 +75,7 @@ namespace CefSharp.OffScreen.Example //Check do not track status var doNotTrack = (bool)preferences["enable_do_not_track"]; - Debug.WriteLine("DoNotTrack:" + doNotTrack); + Debug.WriteLine("DoNotTrack: " + doNotTrack); }); var onUi = Cef.CurrentlyOnThread(CefThreadIds.TID_UI); diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index fb7401375..5281a38c6 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -549,7 +549,7 @@ namespace CefSharp.OffScreen if (IsBrowserInitialized) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } @@ -590,7 +590,7 @@ namespace CefSharp.OffScreen if (IsBrowserInitialized) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } diff --git a/CefSharp.WinForms.Example/Program.cs b/CefSharp.WinForms.Example/Program.cs index 3c8f16f4b..7295654f4 100644 --- a/CefSharp.WinForms.Example/Program.cs +++ b/CefSharp.WinForms.Example/Program.cs @@ -35,7 +35,7 @@ namespace CefSharp.WinForms.Example #if DEBUG if (!System.Diagnostics.Debugger.IsAttached) { - MessageBox.Show("When running this Example outside of Visual Studio" + + MessageBox.Show("When running this Example outside of Visual Studio " + "please make sure you compile in `Release` mode.", "Warning"); } #endif @@ -53,7 +53,7 @@ namespace CefSharp.WinForms.Example #if DEBUG if (!System.Diagnostics.Debugger.IsAttached) { - MessageBox.Show("When running this Example outside of Visual Studio" + + MessageBox.Show("When running this Example outside of Visual Studio " + "please make sure you compile in `Release` mode.", "Warning"); } #endif diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs index 86bd45396..a6c53beaa 100644 --- a/CefSharp.WinForms/ChromiumWebBrowser.cs +++ b/CefSharp.WinForms/ChromiumWebBrowser.cs @@ -79,7 +79,7 @@ namespace CefSharp.WinForms { if (browserCreated) { - throw new Exception("Browser has already been created. BrowserSettings must be" + + throw new Exception("Browser has already been created. BrowserSettings must be " + "set before the underlying CEF browser is created."); } browserSettings = value; @@ -97,7 +97,7 @@ namespace CefSharp.WinForms { if (browserCreated) { - throw new Exception("Browser has already been created. RequestContext must be" + + throw new Exception("Browser has already been created. RequestContext must be " + "set before the underlying CEF browser is created."); } if (value != null && value.GetType() != typeof(RequestContext)) @@ -539,7 +539,7 @@ namespace CefSharp.WinForms if (IsBrowserInitialized) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } @@ -582,7 +582,7 @@ namespace CefSharp.WinForms if (IsBrowserInitialized) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index caf91f29a..6adb2b742 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -131,7 +131,7 @@ namespace CefSharp.Wpf { if (browserCreated) { - throw new Exception("Browser has already been created. BrowserSettings must be" + + throw new Exception("Browser has already been created. BrowserSettings must be " + "set before the underlying CEF browser is created."); } @@ -157,7 +157,7 @@ namespace CefSharp.Wpf { if (browserCreated) { - throw new Exception("Browser has already been created. RequestContext must be" + + throw new Exception("Browser has already been created. RequestContext must be " + "set before the underlying CEF browser is created."); } if (value != null && value.GetType() != typeof(RequestContext)) @@ -2299,7 +2299,7 @@ namespace CefSharp.Wpf if (InternalIsBrowserInitialized()) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } @@ -2340,7 +2340,7 @@ namespace CefSharp.Wpf if (InternalIsBrowserInitialized()) { - throw new Exception("Browser is already initialized. RegisterJsObject must be" + + throw new Exception("Browser is already initialized. RegisterJsObject must be " + "called before the underlying CEF browser is created."); } var objectRepository = managedCefBrowserAdapter.JavascriptObjectRepository; diff --git a/CefSharp/WebBrowserExtensions.cs b/CefSharp/WebBrowserExtensions.cs index 9ff5934c2..c0adc8500 100644 --- a/CefSharp/WebBrowserExtensions.cs +++ b/CefSharp/WebBrowserExtensions.cs @@ -1043,10 +1043,10 @@ namespace CefSharp private static void ThrowExceptionIfCanExecuteJavascriptInMainFrameFalse() { - throw new Exception("Unable to execute javascript at this time, scripts can only be executed within a V8Context." + - "Use the IWebBrowser.CanExecuteJavascriptInMainFrame property to guard against this exception." + + throw new Exception("Unable to execute javascript at this time, scripts can only be executed within a V8Context. " + + "Use the IWebBrowser.CanExecuteJavascriptInMainFrame property to guard against this exception. " + "See https://github.com/cefsharp/CefSharp/wiki/General-Usage#when-can-i-start-executing-javascript " + - "for more details on when you can execute javascript. For frames that do not contain Javascript then no" + + "for more details on when you can execute javascript. For frames that do not contain Javascript then no " + "V8Context will be created. Executing a script once the frame has loaded it's possible to create a V8Context. " + "You can use browser.GetMainFrame().ExecuteJavaScriptAsync(script) or browser.GetMainFrame().EvaluateScriptAsync " + "to bypass these checks (advanced users only).");