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