Agree with Max Lapshin. I also use the same approach.<div><br><div class="gmail_quote">On Mon, Nov 14, 2011 at 4:23 PM, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com">max.lapshin@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think, it is a very good rule to choose whether function can be<br>
tuple-return or throw-return:<br>
if it has to work with outside world, than let is return {ok, Value} |<br>
{error, Reason}<br>
if it is "clean", than return Value or throw error is ok.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>