fallback to throwing Error if creating DOMException fails