1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Kernel: Support grab backtrace stack when assert fail. v5.0.80

This commit is contained in:
winlin 2022-10-21 23:30:43 +08:00
parent 5a1a234855
commit e10fa6dc91
19 changed files with 183 additions and 7 deletions

View file

@ -439,6 +439,8 @@ public:
static int error_code(SrsCplxError* err);
static std::string error_code_str(SrsCplxError* err);
static std::string error_code_longstr(SrsCplxError* err);
public:
static void srs_assert(bool expression);
};
// Error helpers, should use these functions to new or wrap an error.
@ -453,5 +455,9 @@ public:
#define srs_error_code_longstr(err) SrsCplxError::error_code_longstr(err)
#define srs_error_reset(err) srs_freep(err); err = srs_success
#ifndef srs_assert
#define srs_assert(expression) SrsCplxError::srs_assert(expression)
#endif
#endif