Excuse me, Richard, but it's not an answer.<br><br>On Tuesday, July 10, 2012 1:02:29 PM UTC+4, Richard Carlsson wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 07/10/2012 10:43 AM, Dmitry Groshev wrote:
<br>> case do_something() of
<br>> {ok, Result} -> Result;
<br>> {error, Error} -> Error
<br>> end,
<br>> case do_another() of
<br>> {ok, Result} -> Result;
<br>> {error, Error} -> Error
<br>> end,
<br>>
<br>> Result and Error are bound in first case and we will probably have a
<br>> match failure in second one. Compiler warns about this, but it's still
<br>> very unwieldy to fix it with names like Error1, Error2, etc.
<br>
<br>Take it as a sign that you should break out those case expressions into
<br>separate functions, or restructure the code in some other way.
<br>
<br> /Richard
<br>______________________________<wbr>_________________
<br>erlang-questions mailing list
<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a>
<br></blockquote>