private static Exception GetUnsupportedSurfaceFormatException( SurfaceFormat surfaceFormat, string paramName) { var innerException = surfaceFormat.IsCompressedFormat() ? new ArgumentException("Compressed texture formats are currently not supported.") : null; return(new ArgumentException( $"The format {surfaceFormat} is not supported.", paramName, innerException)); }