Skip to content

Commit 6e82717

Browse files
campersauamaitland
authored andcommitted
add spaces in exception messages (#2620)
1 parent 8c93b8b commit 6e82717

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

CefSharp.Core/Cef.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ namespace CefSharp
421421
{
422422
if (_initializedThreadId != Thread::CurrentThread->ManagedThreadId)
423423
{
424-
throw gcnew Exception("Cef.Shutdown must be called on the same thread that Cef.Initialize was called - typically your UI thread." +
425-
"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." +
426-
"Cef.Initialize was called on ManagedThreadId: " + _initializedThreadId + "where Cef.Shutdown is being called on" +
427-
"ManagedThreadId:" + Thread::CurrentThread->ManagedThreadId);
424+
throw gcnew Exception("Cef.Shutdown must be called on the same thread that Cef.Initialize was called - typically your UI thread. " +
425+
"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. " +
426+
"Cef.Initialize was called on ManagedThreadId: " + _initializedThreadId + "where Cef.Shutdown is being called on " +
427+
"ManagedThreadId: " + Thread::CurrentThread->ManagedThreadId);
428428
}
429429

430430
UIThreadTaskFactory = nullptr;

CefSharp.Example/Handlers/BrowserProcessHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void IBrowserProcessHandler.OnContextInitialized()
3737

3838
foreach (var cookie in cookies)
3939
{
40-
Debug.WriteLine("CookieName:" + cookie.Name);
40+
Debug.WriteLine("CookieName: " + cookie.Name);
4141
}
4242
}
4343
else
@@ -54,7 +54,7 @@ void IBrowserProcessHandler.OnContextInitialized()
5454

5555
foreach (var cookie in cookies)
5656
{
57-
Debug.WriteLine("CookieName:" + cookie.Name);
57+
Debug.WriteLine("CookieName: " + cookie.Name);
5858
}
5959
}
6060
else

CefSharp.OffScreen.Example/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ await Cef.UIThreadTaskFactory.StartNew(delegate
7575
//Check do not track status
7676
var doNotTrack = (bool)preferences["enable_do_not_track"];
7777

78-
Debug.WriteLine("DoNotTrack:" + doNotTrack);
78+
Debug.WriteLine("DoNotTrack: " + doNotTrack);
7979
});
8080

8181
var onUi = Cef.CurrentlyOnThread(CefThreadIds.TID_UI);

CefSharp.OffScreen/ChromiumWebBrowser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public void RegisterJsObject(string name, object objectToBind, BindingOptions op
549549

550550
if (IsBrowserInitialized)
551551
{
552-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
552+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
553553
"called before the underlying CEF browser is created.");
554554
}
555555

@@ -590,7 +590,7 @@ public void RegisterAsyncJsObject(string name, object objectToBind, BindingOptio
590590

591591
if (IsBrowserInitialized)
592592
{
593-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
593+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
594594
"called before the underlying CEF browser is created.");
595595
}
596596

CefSharp.WinForms.Example/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static int Main(string[] args)
3535
#if DEBUG
3636
if (!System.Diagnostics.Debugger.IsAttached)
3737
{
38-
MessageBox.Show("When running this Example outside of Visual Studio" +
38+
MessageBox.Show("When running this Example outside of Visual Studio " +
3939
"please make sure you compile in `Release` mode.", "Warning");
4040
}
4141
#endif
@@ -53,7 +53,7 @@ public static int Main(string[] args)
5353
#if DEBUG
5454
if (!System.Diagnostics.Debugger.IsAttached)
5555
{
56-
MessageBox.Show("When running this Example outside of Visual Studio" +
56+
MessageBox.Show("When running this Example outside of Visual Studio " +
5757
"please make sure you compile in `Release` mode.", "Warning");
5858
}
5959
#endif

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public BrowserSettings BrowserSettings
7979
{
8080
if (browserCreated)
8181
{
82-
throw new Exception("Browser has already been created. BrowserSettings must be" +
82+
throw new Exception("Browser has already been created. BrowserSettings must be " +
8383
"set before the underlying CEF browser is created.");
8484
}
8585
browserSettings = value;
@@ -97,7 +97,7 @@ public IRequestContext RequestContext
9797
{
9898
if (browserCreated)
9999
{
100-
throw new Exception("Browser has already been created. RequestContext must be" +
100+
throw new Exception("Browser has already been created. RequestContext must be " +
101101
"set before the underlying CEF browser is created.");
102102
}
103103
if (value != null && value.GetType() != typeof(RequestContext))
@@ -539,7 +539,7 @@ public void RegisterJsObject(string name, object objectToBind, BindingOptions op
539539

540540
if (IsBrowserInitialized)
541541
{
542-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
542+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
543543
"called before the underlying CEF browser is created.");
544544
}
545545

@@ -582,7 +582,7 @@ public void RegisterAsyncJsObject(string name, object objectToBind, BindingOptio
582582

583583
if (IsBrowserInitialized)
584584
{
585-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
585+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
586586
"called before the underlying CEF browser is created.");
587587
}
588588

CefSharp.Wpf/ChromiumWebBrowser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public BrowserSettings BrowserSettings
131131
{
132132
if (browserCreated)
133133
{
134-
throw new Exception("Browser has already been created. BrowserSettings must be" +
134+
throw new Exception("Browser has already been created. BrowserSettings must be " +
135135
"set before the underlying CEF browser is created.");
136136
}
137137

@@ -157,7 +157,7 @@ public IRequestContext RequestContext
157157
{
158158
if (browserCreated)
159159
{
160-
throw new Exception("Browser has already been created. RequestContext must be" +
160+
throw new Exception("Browser has already been created. RequestContext must be " +
161161
"set before the underlying CEF browser is created.");
162162
}
163163
if (value != null && value.GetType() != typeof(RequestContext))
@@ -2299,7 +2299,7 @@ public void RegisterJsObject(string name, object objectToBind, BindingOptions op
22992299

23002300
if (InternalIsBrowserInitialized())
23012301
{
2302-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
2302+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
23032303
"called before the underlying CEF browser is created.");
23042304
}
23052305

@@ -2340,7 +2340,7 @@ public void RegisterAsyncJsObject(string name, object objectToBind, BindingOptio
23402340

23412341
if (InternalIsBrowserInitialized())
23422342
{
2343-
throw new Exception("Browser is already initialized. RegisterJsObject must be" +
2343+
throw new Exception("Browser is already initialized. RegisterJsObject must be " +
23442344
"called before the underlying CEF browser is created.");
23452345
}
23462346
var objectRepository = managedCefBrowserAdapter.JavascriptObjectRepository;

CefSharp/WebBrowserExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,10 +1043,10 @@ private static void ThrowExceptionIfBrowserHostNull(IBrowserHost browserHost)
10431043

10441044
private static void ThrowExceptionIfCanExecuteJavascriptInMainFrameFalse()
10451045
{
1046-
throw new Exception("Unable to execute javascript at this time, scripts can only be executed within a V8Context." +
1047-
"Use the IWebBrowser.CanExecuteJavascriptInMainFrame property to guard against this exception." +
1046+
throw new Exception("Unable to execute javascript at this time, scripts can only be executed within a V8Context. " +
1047+
"Use the IWebBrowser.CanExecuteJavascriptInMainFrame property to guard against this exception. " +
10481048
"See https://github.com/cefsharp/CefSharp/wiki/General-Usage#when-can-i-start-executing-javascript " +
1049-
"for more details on when you can execute javascript. For frames that do not contain Javascript then no" +
1049+
"for more details on when you can execute javascript. For frames that do not contain Javascript then no " +
10501050
"V8Context will be created. Executing a script once the frame has loaded it's possible to create a V8Context. " +
10511051
"You can use browser.GetMainFrame().ExecuteJavaScriptAsync(script) or browser.GetMainFrame().EvaluateScriptAsync " +
10521052
"to bypass these checks (advanced users only).");

0 commit comments

Comments
 (0)