From b5038e7253f014e80f8264cf86224d6da4332bbb Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 27 Oct 2014 18:47:39 -0700 Subject: [PATCH] Move Meteor.Error --- docs/client/basic/sections/methods.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/client/basic/sections/methods.md b/docs/client/basic/sections/methods.md index d81621cc33..965dd8532e 100644 --- a/docs/client/basic/sections/methods.md +++ b/docs/client/basic/sections/methods.md @@ -59,13 +59,6 @@ The client versions of [`insert`](#insert), [`update`](#update), and [`remove`](#remove), which are implemented as methods, use this feature to make client-side interactions with the database appear instant. -{{> autoApiBox "Meteor.Error"}} - -If you want to return an error from a method, throw an exception. Methods can -throw any kind of exception, but `Meteor.Error` is the only kind of error that -will be sent to the client. If a method function throws a different exception, -the client gets `Meteor.Error(500, 'Internal server error')`. - {{> autoApiBox "Meteor.call"}} This is how you call a method. @@ -108,4 +101,11 @@ throwing an exception, just as if you called the function directly: var result = Meteor.call('commentOnPost', comment, postId); ``` +{{> autoApiBox "Meteor.Error"}} + +If you want to return an error from a method, throw an exception. Methods can +throw any kind of exception, but `Meteor.Error` is the only kind of error that +will be sent to the client. If a method function throws a different exception, +the client gets `Meteor.Error(500, 'Internal server error')`. + {{/template}}