Bug 3586 - Format code is removing try { code blocks
Summary: Format code is removing try { code blocks
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8.6
Hardware: Macintosh Mac OS
: High normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-02-22 10:10 UTC by Florin Antoci
Modified: 2012-02-24 07:13 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Florin Antoci 2012-02-22 10:10:59 UTC
In version if I use format code, it's removing the

"try {" part from try-catch blocks.
Comment 1 Mike Krüger 2012-02-23 06:03:55 UTC
Are you using spaces or tabs ?
I think you're using \n line endings on mac and not \r\n ones, right ?

Does it happen for:
public class Foo
	void Bar ()
		try {
			Something ();
		} catch (Foo foo) {

Try to remove some whitespaces or something, I need a use case for this bug to repro it.
Comment 2 Florin Antoci 2012-02-23 11:29:42 UTC

If I'm using this code, for example:

public object GetValue(string p_columnName)
                EntityProperty property = this.GetPropertyByName(p_columnName);
                if (this.Values == null)
                    throw new TableIsEmptyException();
                if (base.Count > property.PropertyIndex)
                    return base[property.PropertyIndex].CurrentValue;
                    throw new TableStructureIncorrectException();
                return null;


Florin Antoci
Comment 3 Mike Krüger 2012-02-24 04:21:37 UTC
I could verify & fix the issue.

Thanks for the test case.