Skip to content

Commit

Permalink
Re-add support for using Yoga without exceptions (#1006)
Browse files Browse the repository at this point in the history
Summary:
This is a partial rollback of 07c0d539bdb3a248762d0a06fd3f622b278a7ecb.

X-link: facebook/yoga#1006

Reviewed By: yungsters

Differential Revision: D40032544

Pulled By: yungsters

fbshipit-source-id: 9ef9b80672eced86a98cfae66c81710bd3ee6f9b
  • Loading branch information
Yannic authored and facebook-github-bot committed Oct 4, 2022
1 parent 3da739b commit 352c4bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/yoga/src/main/cpp/yoga/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@ YGFloatOptional YGFloatOptionalMax(YGFloatOptional op1, YGFloatOptional op2) {
}

void throwLogicalErrorWithMessage(const char* message) {
#if defined(__cpp_exceptions)
throw std::logic_error(message);
#else // !defined(__cpp_exceptions)
std::terminate();
#endif // defined(__cpp_exceptions)
}

0 comments on commit 352c4bb

Please sign in to comment.