Made DLIB_ASSERT and DLIB_CASSERT not kill the process when running inside a

MATLAB mex file.
This commit is contained in:
Davis King 2016-03-08 15:18:19 -05:00
parent ddf48df387
commit deaf8f9455
1 changed files with 9 additions and 0 deletions

View File

@ -254,6 +254,15 @@ namespace dlib
void check_for_previous_fatal_errors()
{
// If dlib is being use to create plugins for some other application, like
// MATLAB, then don't do these checks since it terminates the over arching
// system. Just let the errors go to the plugin handler and it will deal with
// them.
#if defined(MATLAB_MEX_FILE)
return;
#endif
static bool is_first_fatal_error = true;
if (is_first_fatal_error == false)
{