Commit 073ebc39 authored by Romain Courteaud's avatar Romain Courteaud

Ease getAttachment debugging

parent e312afc7
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
.push(function (result) { .push(function (result) {
if (post_function !== undefined) { if (post_function !== undefined) {
return post_function.call( return post_function.call(
context.__storage, context,
argument_list, argument_list,
result result
); );
...@@ -302,6 +302,7 @@ ...@@ -302,6 +302,7 @@
declareMethod(JioProxyStorage, "put", checkId); declareMethod(JioProxyStorage, "put", checkId);
declareMethod(JioProxyStorage, "get", checkId, function (argument_list, result) { declareMethod(JioProxyStorage, "get", checkId, function (argument_list, result) {
// XXX Drop all _ properties
// Put _id properties to the result // Put _id properties to the result
result._id = argument_list[0]._id; result._id = argument_list[0]._id;
return result; return result;
...@@ -366,6 +367,14 @@ ...@@ -366,6 +367,14 @@
// } // }
checkId(param, storage, method_name); checkId(param, storage, method_name);
checkAttachmentId(param, storage, method_name); checkAttachmentId(param, storage, method_name);
}, function (argument_list, result) {
if (!(result.data instanceof Blob)) {
throw new jIO.util.jIOError(
"'getAttachment' (" + argument_list[0]._id + " , " + argument_list[0]._attachment + ") on '" + this.__type + "' does not return a Blob.",
501
);
}
return result;
}); });
JioProxyStorage.prototype.buildQuery = function () { JioProxyStorage.prototype.buildQuery = function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment