Skip to content

Commit b5038e7

Browse files
author
Sashko Stubailo
committed
Move Meteor.Error
1 parent 8ccf52a commit b5038e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/client/basic/sections/methods.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ The client versions of [`insert`](#insert), [`update`](#update), and
5959
[`remove`](#remove), which are implemented as methods, use this feature to make
6060
client-side interactions with the database appear instant.
6161

62-
{{> autoApiBox "Meteor.Error"}}
63-
64-
If you want to return an error from a method, throw an exception. Methods can
65-
throw any kind of exception, but `Meteor.Error` is the only kind of error that
66-
will be sent to the client. If a method function throws a different exception,
67-
the client gets `Meteor.Error(500, 'Internal server error')`.
68-
6962
{{> autoApiBox "Meteor.call"}}
7063

7164
This is how you call a method.
@@ -108,4 +101,11 @@ throwing an exception, just as if you called the function directly:
108101
var result = Meteor.call('commentOnPost', comment, postId);
109102
```
110103

104+
{{> autoApiBox "Meteor.Error"}}
105+
106+
If you want to return an error from a method, throw an exception. Methods can
107+
throw any kind of exception, but `Meteor.Error` is the only kind of error that
108+
will be sent to the client. If a method function throws a different exception,
109+
the client gets `Meteor.Error(500, 'Internal server error')`.
110+
111111
{{/template}}

0 commit comments

Comments
 (0)