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

[brl.blitz] Assert condition Else "text" -vs- Assert condition, "text" #256

Open
GWRon opened this issue Jan 16, 2023 · 1 comment
Open

Comments

@GWRon
Copy link
Contributor

GWRon commented Jan 16, 2023

SuperStrict
Framework Brl.StandardIO


Assert 1=1 Else "assert 1=1"
Assert 1<>1 Else "assert 1<>1"

Leads to (no error message - just the error window):
image

Release builds just print nothing - this is because the code of a release build does not contain any "assert"-handling at all.

A multitude of brl.mod use above "assert else text" style, some the "assert, text"
Some modules removed asserts - d3d7maxd2d.mod eg writes ModuleInfo "History: Changed Assert to Throw. One can at least catch a Throw."

Which variant is to prefer? docs did not mention "else". Docs also do not mention that it is not included in release builds.

@GWRon
Copy link
Contributor Author

GWRon commented Jan 16, 2023

Maybe extend the documentation of "assert" to be stripped away in release builds.

While modifying that file, remove "goto" from the docs too.

@GWRon GWRon changed the title [brl.blitz] Assert condition Else "text" - raises exception error [brl.blitz] Assert condition Else "text" - raises exception error for wrong thing? Jan 16, 2023
@GWRon GWRon changed the title [brl.blitz] Assert condition Else "text" - raises exception error for wrong thing? [brl.blitz] Assert condition Else "text" -vs- Assert condition, "text" Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant