Ensure resize error from C++ is wrapped

Thanks to @papandreou
This commit is contained in:
Lovell Fuller
2014-10-23 09:39:37 +01:00
parent 3e1be7a33a
commit 97fc2a2a3a
4 changed files with 14 additions and 3 deletions

View File

@@ -586,7 +586,7 @@ class ResizeWorker : public NanAsyncWorker {
Handle<Value> argv[3] = { NanNull(), NanNull(), NanNull() };
if (!baton->err.empty()) {
// Error
argv[0] = NanNew<String>(baton->err.data(), baton->err.size());
argv[0] = Exception::Error(NanNew<String>(baton->err.data(), baton->err.size()));
} else {
int width = baton->width;
int height = baton->height;