Add a NewErr method for embedding.