parameters: ( eventLogRecord, logType=None )
docstring: As for FormatMessage, except returns an error message if
      the message can not be processed.
docstring_summary: As for FormatMessage, except returns an error message if
      the message can not be processed.
docstring_tokens: As for FormatMessage except returns an error message if the message can not be processed .
function: def SafeFormatMessage( eventLogRecord, logType=None ):
      """As for FormatMessage, except returns an error message if
      the message can not be processed.
      """
      if logType is None: logType = "Application"
      try:
          return FormatMessage(eventLogRecord, logType)
      except win32api.error:
          if eventLogRecord.StringInserts is None:
              desc = ""
          else:
              desc = u", ".join(eventLogRecord.StringInserts)
          return u"<The description for Event ID ( %d ) in Source ( %r ) could not be found. It contains the following insertion string(s):%r.>" % (winerror.HRESULT_CODE(eventLogRecord.EventID), eventLogRecord.SourceName, desc)
function_tokens: def SafeFormatMessage ( eventLogRecord , logType = None ) : if logType is None : logType = "Application" try : return FormatMessage ( eventLogRecord , logType ) except win32api . error : if eventLogRecord . StringInserts is None : desc = "" else : desc = u", " . join ( eventLogRecord . StringInserts ) return u"<The description for Event ID ( %d ) in Source ( %r ) could not be found. It contains the following insertion string(s):%r.>" % ( winerror . HRESULT_CODE ( eventLogRecord . EventID ) , eventLogRecord . SourceName , desc )