[erlang-questions] mnesia:delete on nonexistent key: ok?

Andras Georgy Bekes <>
Tue Jun 10 15:53:20 CEST 2008


> IS> does mnesia:delete on a tab/key that's not there return ok?
> IS> (I seem to observe this, but I'm can't find documentation on
> whether IS> this is the intended behaviour.)
> Yes, it is the intended behavior. Mnesia, ets and dets
> all regards this as a normal case (not an error).
Just like lists, dict, sets, orddict, ordsets, and in some sense, the 
process dictionary.

It seems only gb_sets and gb_trees are different: they have two delete 
operations, one that crashes if the element (key) not found, and one 
that doesn't.

	Georgy



More information about the erlang-questions mailing list