Skip to content

Commit

Permalink
Pass error to the callback on /Astronomy/execute error
Browse files Browse the repository at this point in the history
  • Loading branch information
lukejagodzinski committed Feb 16, 2018
1 parent 966b117 commit 841670b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .versions
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ [email protected]
[email protected]
[email protected]
[email protected]
jagi:[email protected].4
jagi:[email protected].5
[email protected]
local-test:jagi:[email protected].4
local-test:jagi:[email protected].5
[email protected]
mdg:[email protected]
[email protected]
Expand Down
20 changes: 14 additions & 6 deletions lib/modules/methods/class_prototype_methods/applyMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ function applyMethod(methodName, methodArgs, callback) {
})
};

return callMeteorMethod(
Class,
"/Astronomy/execute",
[meteorMethodArgs],
callback
);
try {
return callMeteorMethod(
Class,
"/Astronomy/execute",
[meteorMethodArgs],
callback
);
} catch (err) {
if (callback) {
callback(err);
return null;
}
throw err;
}
}

export default applyMethod;

0 comments on commit 841670b

Please sign in to comment.