How to cancel event in beforeCreate?

Hello
i want to create an object and i want to check something in
beforeCreate method then create object.the problem is i can’t prevent
creating object by throw Exception.
i tried this codes:

throw new Exception("message");
throw new BackendlessException(message,code);
 

but it’s not work.

Hi Reza,
Please use context.setPrematureResult( … ) to short-circuit you request.
Artur