Code review comment: ```suggestion             throw createLauncherException("unable to resolve the target path:" + e.getMessage()); ```

Code before review:
public void execute() {
long start = 0;
if (this.helpFlag) {
String commandUsageInfo = BLauncherCmd.getCommandUsageInfo(RUN_COMMAND);
this.errStream.println(commandUsageInfo);
return;
}
if (this.debugPort != null) {
System.setProperty(SYSTEM_PROP_BAL_DEBUG, this.debugPort);
}
String[] args = new String[0];
if (!argList.isEmpty()) {
if (!argList.get(0).equals("--")) {
this.projectPath = Paths.get(argList.get(0));
if (RunCommand.JAR_EXTENSION_MATCHER.matches(this.projectPath)) {
CommandUtil.printError(this.errStream, "unsupported option(s) provided for jar execution",
runCmd, true);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
if (argList.size() > 1 && !argList.get(1).equals("--")) {
CommandUtil.printError(this.errStream,
"unmatched command argument found: " + argList.get(1), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
if (argList.size() > 2 && argList.get(1).equals("--")) {
args = argList.subList(2, argList.size()).toArray(new String[0]);
}
} else {
if (argList.size() > 1 && argList.get(0).equals("--")) {
args = argList.subList(1, argList.size()).toArray(new String[0]);
}
}
}
if (sticky == null) {
sticky = false;
}
Project project;
BuildOptions buildOptions = constructBuildOptions();
boolean isSingleFileBuild = false;
if (FileUtils.hasExtension(this.projectPath)) {
try {
if (buildOptions.dumpBuildTime()) {
start = System.currentTimeMillis();
BuildTime.getInstance().timestamp = start;
}
project = SingleFileProject.load(this.projectPath, buildOptions);
if (buildOptions.dumpBuildTime()) {
BuildTime.getInstance().projectLoadDuration = System.currentTimeMillis() - start;
}
} catch (ProjectException e) {
CommandUtil.printError(this.errStream, e.getMessage(), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
isSingleFileBuild = true;
} else {
try {
if (buildOptions.dumpBuildTime()) {
start = System.currentTimeMillis();
BuildTime.getInstance().timestamp = start;
}
project = BuildProject.load(this.projectPath, buildOptions);
if (buildOptions.dumpBuildTime()) {
BuildTime.getInstance().projectLoadDuration = System.currentTimeMillis() - start;
}
} catch (ProjectException e) {
CommandUtil.printError(this.errStream, e.getMessage(), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
}
if (ProjectUtils.isProjectEmpty(project)) {
CommandUtil.printError(this.errStream, "package is empty. Please add at least one .bal file.", null, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
Target target;
try {
if (project.kind().equals(ProjectKind.BUILD_PROJECT)) {
target = new Target(project.targetDir());
} else {
target = new Target(Files.createTempDirectory("ballerina-cache" + System.nanoTime()));
target.setOutputPath(target.getBinPath());
}
} catch (IOException e) {
throw createLauncherException("unable to resolve target path:" + e.getMessage());
} catch (ProjectException e) {
throw createLauncherException("unable to create executable:" + e.getMessage());
}
boolean isPackageModified = isProjectUpdated(project);
TaskExecutor taskExecutor = new TaskExecutor.TaskBuilder()
.addTask(new CleanTargetDirTask(isPackageModified, buildOptions.enableCache()), isSingleFileBuild)
.addTask(new RunBuildToolsTask(outStream), isSingleFileBuild)
.addTask(new ResolveMavenDependenciesTask(outStream))
.addTask(new CompileTask(outStream, errStream, false, false,
isPackageModified, buildOptions.enableCache()))
.addTask(new CreateExecutableTask(outStream, null, target, true))
.addTask(new RunExecutableTask(args, outStream, errStream, target))
.addTask(new DumpBuildTimeTask(outStream), !project.buildOptions().dumpBuildTime())
.build();
taskExecutor.executeTasks(project);
}

Line under review: throw createLauncherException("unable to resolve target path:" + e.getMessage());

Code after addressing the review:
public void execute() {
long start = 0;
if (this.helpFlag) {
String commandUsageInfo = BLauncherCmd.getCommandUsageInfo(RUN_COMMAND);
this.errStream.println(commandUsageInfo);
return;
}
if (this.debugPort != null) {
System.setProperty(SYSTEM_PROP_BAL_DEBUG, this.debugPort);
}
String[] args = new String[0];
if (!argList.isEmpty()) {
if (!argList.get(0).equals("--")) {
this.projectPath = Paths.get(argList.get(0));
if (RunCommand.JAR_EXTENSION_MATCHER.matches(this.projectPath)) {
CommandUtil.printError(this.errStream, "unsupported option(s) provided for jar execution",
runCmd, true);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
if (argList.size() > 1 && !argList.get(1).equals("--")) {
CommandUtil.printError(this.errStream,
"unmatched command argument found: " + argList.get(1), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
if (argList.size() > 2 && argList.get(1).equals("--")) {
args = argList.subList(2, argList.size()).toArray(new String[0]);
}
} else {
if (argList.size() > 1 && argList.get(0).equals("--")) {
args = argList.subList(1, argList.size()).toArray(new String[0]);
}
}
}
if (sticky == null) {
sticky = false;
}
Project project;
BuildOptions buildOptions = constructBuildOptions();
boolean isSingleFileBuild = false;
if (FileUtils.hasExtension(this.projectPath)) {
try {
if (buildOptions.dumpBuildTime()) {
start = System.currentTimeMillis();
BuildTime.getInstance().timestamp = start;
}
project = SingleFileProject.load(this.projectPath, buildOptions);
if (buildOptions.dumpBuildTime()) {
BuildTime.getInstance().projectLoadDuration = System.currentTimeMillis() - start;
}
} catch (ProjectException e) {
CommandUtil.printError(this.errStream, e.getMessage(), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
isSingleFileBuild = true;
} else {
try {
if (buildOptions.dumpBuildTime()) {
start = System.currentTimeMillis();
BuildTime.getInstance().timestamp = start;
}
project = BuildProject.load(this.projectPath, buildOptions);
if (buildOptions.dumpBuildTime()) {
BuildTime.getInstance().projectLoadDuration = System.currentTimeMillis() - start;
}
} catch (ProjectException e) {
CommandUtil.printError(this.errStream, e.getMessage(), runCmd, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
}
if (ProjectUtils.isProjectEmpty(project)) {
CommandUtil.printError(this.errStream, "package is empty. Please add at least one .bal file.", null, false);
CommandUtil.exitError(this.exitWhenFinish);
return;
}
Target target;
try {
if (project.kind().equals(ProjectKind.BUILD_PROJECT)) {
target = new Target(project.targetDir());
} else {
target = new Target(Files.createTempDirectory("ballerina-cache" + System.nanoTime()));
target.setOutputPath(target.getBinPath());
}
} catch (IOException e) {
throw createLauncherException("unable to resolve the target path:" + e.getMessage());
} catch (ProjectException e) {
throw createLauncherException("unable to create the executable:" + e.getMessage());
}
boolean isPackageModified = isProjectUpdated(project);
TaskExecutor taskExecutor = new TaskExecutor.TaskBuilder()
.addTask(new CleanTargetDirTask(isPackageModified, buildOptions.enableCache()), isSingleFileBuild)
.addTask(new RunBuildToolsTask(outStream), isSingleFileBuild)
.addTask(new ResolveMavenDependenciesTask(outStream))
.addTask(new CompileTask(outStream, errStream, false, false,
isPackageModified, buildOptions.enableCache()))
.addTask(new CreateExecutableTask(outStream, null, target, true))
.addTask(new RunExecutableTask(args, outStream, errStream, target))
.addTask(new DumpBuildTimeTask(outStream), !project.buildOptions().dumpBuildTime())
.build();
taskExecutor.executeTasks(project);
}