Skip to content
New issue

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

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

Already on GitHub? # to your account

Validation if statements in generated code should not nest #5

Open
tylerjw opened this issue Jul 7, 2022 · 0 comments
Open

Validation if statements in generated code should not nest #5

tylerjw opened this issue Jul 7, 2022 · 0 comments

Comments

@tylerjw
Copy link
Contributor

tylerjw commented Jul 7, 2022

Example of how they could be implemented:

if (auto const validate_result = validatefunc(param); !validate_result.success()) {
	throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc2(param); !validate_result.success()) {
	throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc3(param); !validate_result.success()) {
	throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc4(param); !validate_result.success()) {
	throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant