Error(string msg)
This method is automatically called in case of a fatal error; it simply throws an exception with the provided message. A derived class can override it to customize error handling, but the method should never return, otherwise the resulting document would probably be invalid.
msg
: The error message.