mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- fix livedata - basic method invocation
options.throwThroughFuture was used to fix a bug with errors and fibers (issue #1482). As we don't use Fibers anymore, this won't be needed
This commit is contained in:
@@ -16,7 +16,6 @@ Meteor.methods({
|
||||
options,
|
||||
Match.Optional({
|
||||
intended: Match.Optional(Boolean),
|
||||
throwThroughFuture: Match.Optional(Boolean)
|
||||
})
|
||||
);
|
||||
options = options || Object.create(null);
|
||||
@@ -32,14 +31,6 @@ Meteor.methods({
|
||||
else e = new Error('Test method throwing an exception');
|
||||
e._expectedByTest = true;
|
||||
|
||||
// We used to improperly serialize errors that were thrown through a
|
||||
// future first.
|
||||
if (Meteor.isServer && options.throwThroughFuture) {
|
||||
const Future = Npm.require('fibers/future');
|
||||
const f = new Future();
|
||||
f['throw'](e);
|
||||
e = f.wait();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -314,7 +314,6 @@ testAsyncMulti('livedata - basic method invocation', [
|
||||
try {
|
||||
await Meteor.callAsync('exception', 'both', {
|
||||
intended: true,
|
||||
throwThroughFuture: true,
|
||||
});
|
||||
} catch (e) {
|
||||
threw = true;
|
||||
@@ -349,7 +348,6 @@ testAsyncMulti('livedata - basic method invocation', [
|
||||
'server',
|
||||
{
|
||||
intended: true,
|
||||
throwThroughFuture: true,
|
||||
},
|
||||
expect(failure(test, 999, 'Client-visible test exception'))
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user