/// <summary>
 /// Writes the null argument io exception to the stream, then shuts down the game.
 /// </summary>
 /// <param name="ane">The ane.</param>
 /// <param name="elementType">Type of the element.</param>
 /// <param name="elementNumber">The element number.</param>
 public static void WriteNullArgumentIoException(ArgumentNullException ane, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         ane,
         string.Format("file IO argument null exception: io type {0}, elementNumber {1}, xml-line number: {2}",
                       elementType.ToString(),
                       elementNumber));
 }
 /// <summary>
 /// Write fatal IO exception, then close down the game.
 /// </summary>
 /// <param name="exception"></param>
 /// <param name="xElement"></param>
 public static void WriteFatalIOException(Exception exception, XElement xElement, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         exception,
         string.Format("file IO exception: io type {0}, elementNumber {1}, xElementData: {2}, xml line number: {3}",
                       elementType.ToString(),
                       elementNumber,
                       xElement.Value,
                       xElement.LineNumber()));
 }