Add DOMError macro definition. Change reference to copy to fix the crash bug.
Add error mapping.