On Fri, May 16, 2008 at 7:01 PM, Matthew Dempsky <<a href="mailto:matthew@dempsky.org">matthew@dempsky.org</a>> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">> What are the reasons for ets to exit with badarg when creating duplicate<br>
> tables?<br>
</div>Duplicate named tables? Because the name is the only way to reference<br>
the table, and you can't specify which table you mean in future calls<br>
if two share a name.</blockquote><div class="Ih2E3d"> <br>Well, yes of course. Let me rephrase my question: What is the reason for ets to exit with badarg instead of, for example, {error, duplicate_table}?<br><br><br><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> > How would I differ from a real badarg and a duplicate table? I guess I<br>
> can't?<br></blockquote>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You can check a table's existence with ets:info/2.</blockquote><div> <br>Which ets already does for me, except that it crashes with badarg. This is harder to debug since you cannot differ between a bad argument (e.g. ets:new("MyTable")) or a duplicate named table.<br>
<br>/Adam<br></div></div>