DesktopExecException if string can't be unquoted, unquoted command line is empty or it has unknown field code.
assert(expandExecString(`"quoted program" %i -w %c -f %k %U %D %u %f %F`, ["one", "two"], "folder", "Программа", "/example.desktop") == ["quoted program", "--icon", "folder", "-w", "Программа", "-f", "/example.desktop", "one", "two", "one", "one", "one", "two"]); assertThrown!DesktopExecException(expandExecString(`program %f %y`)); //%y is unknown field code. assertThrown!DesktopExecException(expandExecString(``));
expandExecArgs, parseExecString
Unquote, unescape Exec string and expand field codes substituting them with appropriate values.