-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove SPARTA_ASSERT in favor of SPARTA_RUNTIME_CHECK
Summary: We currently have two different types of runtime checks: * `SPARTA_ASSERT`, which is just an alias for the C `assert()` * `SPARTA_RUNTIME_CHECK` which throws an exception This diff proposes to remove `SPARTA_ASSERT` in favor of `SPARTA_RUNTIME_CHECK`, for the following reasons: * `SPARTA_RUNTIME_CHECK` throws an exception, which can be caught and properly written out, rather than crashing the whole program. This can be important in multithreaded environments * `assert()` might not be recommended in certain environments. For instance, `redex` defines its own `assert` macros. Reviewed By: arnaudvenet Differential Revision: D52162691 fbshipit-source-id: e420125f4f689f5fe1c6d761cb4a034f83fdbb71
- Loading branch information
1 parent
542b1de
commit 345a3c5
Showing
4 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters