Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
catch( -> catch (
  • Loading branch information
xtqqczze committed Feb 8, 2025
commit 6cd02257c192095b63d8501ceb01ae08b1f2e574
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override object ChangeType(object value, Type type, CultureInfo? cultureI
return RetObj;
}
#if DISPLAY_DEBUG_INFO
catch(NotSupportedException e)
catch (NotSupportedException e)
#else
catch (NotSupportedException)
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/SuperFileCheck/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ static async Task<int> Main(string[] args)
Console.Write(String.Join(' ', methodDeclInfos.Select(x => x.FullyQualifiedName)));
return 0;
}
catch(Exception ex)
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(ex.Message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3152,7 +3152,7 @@ private void setEHinfo(uint EHnumber, ref CORINFO_EH_CLAUSE clause)

// Currently, the only place we are using a token here is for a COM-to-CLR exception-to-HRESULT
// mapping catch clause. We want this catch clause to catch all exceptions, so we override the
// token to be mdTypeRefNil, which used by the EH system to mean catch(...)
// token to be mdTypeRefNil, which used by the EH system to mean catch (...)
Debug.Assert(clauseType.IsObject);
clause.ClassTokenOrOffset = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public async Task<HttpResponseMessage> CallFetch()
var closePromise = BrowserHttpInterop.TransformStreamClose(_jsController);
await BrowserHttpInterop.CancellationHelper(closePromise, _cancellationToken, _jsController).ConfigureAwait(false);
}
catch(JSException jse) when (jse.Message.Contains("BrowserHttpWriteStream.Rejected", StringComparison.Ordinal))
catch (JSException jse) when (jse.Message.Contains("BrowserHttpWriteStream.Rejected", StringComparison.Ordinal))
{
// any error from pushing bytes will also appear in the fetch promise result
}
Expand Down
10 changes: 5 additions & 5 deletions src/mono/mono/mini/devirtualization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,35 +161,35 @@ static public int test_0_npe_still_happens() {
try {
y.method1();
return 1;
} catch(NullReferenceException e) {
} catch (NullReferenceException e) {
;//ok
}

try {
y.method2();
return 2;
} catch(NullReferenceException e) {
} catch (NullReferenceException e) {
;//ok
}

try {
y.method3();
return 3;
} catch(NullReferenceException e) {
} catch (NullReferenceException e) {
;//ok
}

try {
x.method4();
return 4;
} catch(NullReferenceException e) {
} catch (NullReferenceException e) {
;//ok
}

try {
x.method5();
return 5;
} catch(NullReferenceException e) {
} catch (NullReferenceException e) {
;//ok
}

Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/Wasm.Build.Tests/IcuTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected string GetProgramText(string testedLocales, bool onlyPredefinedCulture
continue;
}}
}}
catch(CultureNotFoundException cnfe) when (ctorShouldFail && cnfe.Message.Contains($""{{testLocale.Code}} is an invalid culture identifier.""))
catch (CultureNotFoundException cnfe) when (ctorShouldFail && cnfe.Message.Contains($""{{testLocale.Code}} is an invalid culture identifier.""))
{{
Console.WriteLine($""{{testLocale.Code}}: Success. .ctor failed as expected."");
continue;
Expand Down Expand Up @@ -130,7 +130,7 @@ protected ProjectInfo CreateIcuProject(
string programText = GetProgramText(testedLocales, onlyPredefinedCultures);
File.WriteAllText(programPath, programText);
_testOutput.WriteLine($"----- Program: -----{Environment.NewLine}{programText}{Environment.NewLine}-------");

UpdateBrowserMainJs();
return info;
}
Expand Down Expand Up @@ -160,7 +160,7 @@ protected async Task<string> PublishAndRunIcuTest(
RunResult runOutput = await RunForPublishWithWebServer(runOptions);
return $"{buildOutput}\n{runOutput.TestOutput}";
}
catch(Exception ex)
catch (Exception ex)
{
Console.WriteLine($"Exception: {ex}; _testOutput={_testOutput}");
throw;
Expand Down