提交 0bb058c1 编写于 作者: M Megvii Engine Team

fix(mgb/lite): fix LITE_ASSERT bug while build with no exception

GitOrigin-RevId: 05060dee1f89df661e02c2e66ae50cf667ec2b7a
上级 d02b0a08
......@@ -6,7 +6,8 @@
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied.
*/
#pragma once
......@@ -69,10 +70,11 @@ void print_log(LiteLogLevel level, const char* format = 0, ...)
#if LITE_ENABLE_EXCEPTION
#define LITE_THROW(msg) throw lite::Error(msg)
#else
#define LITE_THROW(msg) \
do { \
LITE_ERROR(msg); \
__builtin_trap(); \
#define LITE_THROW(msg) \
do { \
std::string msg_str(msg); \
LITE_ERROR(msg_str.c_str()); \
__builtin_trap(); \
} while (0)
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册