Registry Mirror
Skip to content

Continue statement unrecognized in try-catch #2829

Closed

Description

@sgkoishi

Input code

https://sharplab.io/#gist:ca290c8cdd39ae90d27894091c5ee33a
Loop over array:

foreach (...) // or for (...)
{
	try
	{
		// Action
	}
	catch (..)
	{
		continue;
	}
	// Action 2
}

Loop over Iterator:
https://github.com/Pryaxis/TSAPI/blob/general-devel/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs#L348

Erroneous output

foreach (...) // or for (...)
{
	try
	{
		// Action
	}
	catch (..)
	{
		goto IL_TAG;
	}
	// Action 2
	IL_TAG:
	;
}

Details

  • Product in use: ILSpy
  • Version in use: 8.0.0.7136-preview2

Nothing wrong with the actual behaviour but just improvement.

The loop over iterator example binary is available through NuGet or zip, bin/TerrariaServer.dll. Some continue were recognized but the one within BadImageFormatException was not.

Activity

  1. added
    Decompiler
    on Nov 5, 2022
  2. added a commit that references this issue on Oct 10, 2026
    c3da4a8
  3. added a commit that references this issue on Oct 10, 2026
    04a0b6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDecompiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions