TeaSpeak-Client/native/dist/ext_nan/NanException.h

10 lines
756 B
C
Raw Normal View History

2019-06-26 16:09:01 -04:00
#pragma once
#define NAN_THROW_EXCEPTION(type, message) \
do { \
auto isolate = Nan::GetCurrentContext()->GetIsolate(); \
auto exception = v8::Exception::type(v8::String::NewFromUtf8(isolate, message, v8::NewStringType::kNormal).ToLocalChecked()); \
isolate->ThrowException(exception); \
} while(0)