Bugfix of Exception Handling

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2021-05-03 19:20:52 +09:00
parent 8a2d28a5e4
commit 4478eafc8d
11 changed files with 43 additions and 30 deletions

View File

@@ -118,6 +118,7 @@ public:
Runnable(){}
virtual ~Runnable(){}
virtual void EXECRUN(){}
int threadNo {0};
};
#define MAGIC_WORD_FOR_THREAD \
@@ -130,9 +131,9 @@ public: void EXECRUN() \
} \
catch ( Exception &ex ) \
{ \
theMultiTaskProcess->threadStopped(); \
WRITELOG("%s catch exception\n", getTaskName()); \
ex.writeMessage(); \
theMultiTaskProcess->abort(threadNo); \
} \
}
@@ -151,6 +152,7 @@ public:
void stop(void);
const char* getTaskName(void);
void setTaskName(const char* name);
void abort(int threadNo);
private:
static void* _run(void*);
pthread_t _threadID;