2016-03-12 18:50:43 +00:00
|
|
|
#ifndef INCLUDED_TaskTryCatch
|
|
|
|
#define INCLUDED_TaskTryCatch
|
|
|
|
|
|
|
|
#include <v8.h>
|
|
|
|
|
|
|
|
class Task;
|
|
|
|
|
|
|
|
class TaskTryCatch {
|
|
|
|
public:
|
|
|
|
TaskTryCatch(Task* task);
|
|
|
|
~TaskTryCatch();
|
2016-03-13 13:37:58 +00:00
|
|
|
bool hasCaught();
|
2016-03-12 18:50:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
v8::TryCatch _tryCatch;
|
|
|
|
static const char* toString(const v8::String::Utf8Value& value);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|