This repository was archived by the owner on Aug 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2904,12 +2904,18 @@ MC_DLLEXPORT bool MCErrorThrow(MCErrorRef error);
29042904// Catch the current error code (on the current thread) if any and clear it.
29052905MC_DLLEXPORT bool MCErrorCatch (MCErrorRef& r_error);
29062906
2907+ // Resets the error state on the current thread. This call is equivalent to:
2908+ // MCAutoErrorRef t_error;
2909+ // MCErrorCatach(&t_error);
2910+ MC_DLLEXPORT void MCErrorReset (void );
2911+
29072912// Returns true if there is an error pending on the current thread.
29082913MC_DLLEXPORT bool MCErrorIsPending (void );
29092914
29102915// Returns any pending error (on the current thread) without clearing it.
29112916MC_DLLEXPORT MCErrorRef MCErrorPeek (void );
29122917
2918+
29132919// Throw an out of memory error.
29142920MC_DLLEXPORT bool MCErrorThrowOutOfMemory (void );
29152921
Original file line number Diff line number Diff line change @@ -408,6 +408,13 @@ bool MCErrorCatch(MCErrorRef& r_error)
408408 return true ;
409409}
410410
411+ MC_DLLEXPORT_DEF
412+ void MCErrorReset (void )
413+ {
414+ MCAutoErrorRef t_error;
415+ MCErrorCatch (&t_error);
416+ }
417+
411418MC_DLLEXPORT_DEF
412419MCErrorRef MCErrorPeek (void )
413420{
You can’t perform that action at this time.
0 commit comments