|
◆ CheckResult()
Check the result of the thread.
If the thread failed (threw an exception), then, will report details using Ers or re-throw depending on the argument
- Warning
- If status is not nullptr, then the DRAMA lock must be taken by the invoking thread. Normally you would take the DRAMA lock via drama::thread::AccessDrama() to ensure the context of any ERS message is correct. If the lock is not taken, then the a drama::Exception is thrown with status code DRAMA2__LOCK_ERR.
-
Only invoke this if IsRunning() has returned false. If thread is still running, this will throw a drama::Exception with a status code of DRAMA2__DISPATCHER_THREAD_RUNNING
- Parameters
-
status | If nullptr, then rethrow any exception reported in the context of the current thread. IF not null, then report them using Ers and return status here.
|
- Returns
- True if the thread completed ok. Otherwise false, but will never return false if throwExceptOnFailure is true. If the thread has no yet been run or not been run since the last call to this method, then True is also returned.
|