- 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:
denihs
2023-01-30 11:24:35 -04:00
parent 7deb4af148
commit 65d44b501d
2 changed files with 0 additions and 11 deletions

View File

@@ -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;
}
},

View File

@@ -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'))
),