Update change log and spec for wrt-plugins-tizen_0.4.25-1
[platform/framework/web/wrt-plugins-tizen.git] / src / Messaging / JSMessageAttachment.cpp
index 846f8dc..792b766 100644 (file)
@@ -30,6 +30,7 @@
 #include "Attachment.h"
 
 #include <JSWebAPIError.h>
+#include <JSWebAPIException.h>
 #include <ArgumentValidator.h>
 #include <Logger.h>
 
@@ -547,13 +548,15 @@ JSObjectRef JSMessageAttachment::constructor(JSContextRef context,
                }
        }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;
 }