#include "JSSortMode.h"
#include <string>
#include <dpl/shared_ptr.h>
-#include <JSWebAPIException.h>
#include <JSUtil.h>
#include <ArgumentValidator.h>
+#include <JSWebAPIErrorFactory.h>
#include <Logger.h>
#define ATTRIBUTE_FILTER_CLASS_NAME "SortMode"
}
catch(BasePlatformException &e)
{
- JSObjectRef exceptionObj = JSWebAPIException::makeJSWebAPIException(context, e);
- *exception = exceptionObj;
- return exceptionObj;
+ return JSWebAPIErrorFactory::postException(context, exception, e);
}
try
}
catch(BasePlatformException &e)
{
- JSObjectRef exceptionObj = JSWebAPIException::makeJSWebAPIException(context, e);
- *exception = exceptionObj;
- return exceptionObj;
+ return JSWebAPIErrorFactory::postException(context, exception, e);
}
SortModePtr sortMode(new SortMode(attributeName, sortOrder));
Catch(Exception)
{
LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
- JSObjectRef exceptionObj = JSWebAPIException::makeJSWebAPIException(
- context, TypeMismatchException("Error occurred while creating object"));
- *exception = exceptionObj;
- return exceptionObj;
+ return JSWebAPIErrorFactory::postException(context, exception,
+ TypeMismatchException("Error occurred while creating object"));
}
return jsobject;