Skip to content

Corrected all asserts with exit(EXIT_FAILURE)#2

Open
vickvey wants to merge 1 commit intoAlexanderAgd:masterfrom
vickvey:master
Open

Corrected all asserts with exit(EXIT_FAILURE)#2
vickvey wants to merge 1 commit intoAlexanderAgd:masterfrom
vickvey:master

Conversation

@vickvey
Copy link

@vickvey vickvey commented Oct 11, 2024

  • assert.h should not be in production code.
  • We are already printing the error messages but was using assert() as a break point to break the program in between, this might not be a great idea as assert also exposes the source variables in the console or so.
  • I replaced it with exit(EXIT_FAILURE) as it is more robust way of exiting the program, It helps us in hiding the source variables info which were exposed in assert() and gives us a robust way of exiting a program.

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

Successfully merging this pull request may close these issues.

1 participant