#include "Attachment.h"
#include <JSWebAPIError.h>
+#include <JSWebAPIException.h>
#include <ArgumentValidator.h>
#include <Logger.h>
}
}catch(BasePlatformException & e) {
LoggerE("Message creation failed: " << e.getMessage());
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, e);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, e);
*exception = error;
+ return error;
}
catch(...) {
DeviceAPI::Common::UnknownException err("UnknownError in Message constructor.");
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, err);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, err);
*exception = error;
+ return error;
}
return NULL;
}