Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tryCatch: next with single-line try-catch #509

Open
Gama11 opened this issue Jun 14, 2019 · 0 comments
Open

tryCatch: next with single-line try-catch #509

Gama11 opened this issue Jun 14, 2019 · 0 comments
Labels
bug Something isn't working sameline broken same line formatting

Comments

@Gama11
Copy link
Member

Gama11 commented Jun 14, 2019

Describe the bug

This seems broken - for single-line try-catch expressions, the setting should probably not apply?

Input file

class Main {
	static function main() {
		var applicationName = try ProjectUtils.getApplicationFile(FileSystem.fullPath(project.projectXmlPath)) catch (_:Dynamic) project.name;
	}
}

Broken output

class Main {
	static function main() {
		var applicationName = try ProjectUtils.getApplicationFile(FileSystem.fullPath(project.projectXmlPath))
		catch (_:Dynamic) project.name;
	}
}

Optional: hxformat.json

{
	"sameLine": {
		"tryCatch": "next"
	}
}
@Gama11 Gama11 added bug Something isn't working sameline broken same line formatting labels Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sameline broken same line formatting
Projects
None yet
Development

No branches or pull requests

1 participant