TeaSpeak-Client/native/dist/ext_nan/include/NanException.h
2019-11-24 16:24:22 +01:00

10 lines
756 B
C

#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)