I do not know the context here. Were you asked to perform at this place and some "magician" started to yell out the secrets? Or did you just walk up to a group of friends to show some tricks and someone else in the group started acting like a jerk? In any case, the answer is control. You have to control the audience, which is easier said than done

.
If you have just started your act and the person in question starts heckling, than I would stop and maybe make some pithy statement like, "no, no, no, not now--you can do your tricks when I am done." Make the whole thing funny. Make the crowd laugh---with you, but try to avoid a big verbal battle with the jerk. Sometimes this works. But if humor does not seem to work and he is really bad, I would act very calm and cool and wait to see what the rest of the crowd does. Try some tricks he does not know. If the crowd really wants to see magic, they will stop the heckler and you will come off mature and professional. If they don't help, then I would just smile and leave. There is no point in continuing under these conditions. Handling a really bad performance can take years of experience. Really good magic helps.
And this other "person" is not a magician. Magicians never bust other magicians.
Mistakes? Just chalk it up to experience. You said it yourself--everyone makes them.