mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure resize error from C++ is wrapped
Thanks to @papandreou
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user