def __regex_err_msg(match, regex):
 err_msg = (StdioErrorLevel.desc(regex.error_level) + ': ')
 if (None is not regex.desc):
  err_msg += regex.desc
 else:
  mstart = match.start()
  mend = match.end()
  err_msg += 'Matched on '
  if ((mend - mstart) > 256):
   err_msg += (match.string[mstart:(mstart + 256)] + '...')
  else:
   err_msg += match.string[mstart:mend]
 return err_msg

def __regex_err_msg ( match , regex ) : err_msg = ( StdioErrorLevel . desc ( regex . error_level ) + ': ' ) if ( None is not regex . desc ) : err_msg += regex . desc else : mstart = match . start ( ) mend = match . end ( ) err_msg += 'Matched on ' if ( ( mend - mstart ) > 256 ) : err_msg += ( match . string [ mstart : ( mstart + 256 ) ] + '...' ) else : err_msg += match . string [ mstart : mend ] return err_msg
return a message about the match on tool output using the given toolstdioregex regex object .