Document how ErlangError works, closes #2166