mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-07 09:01:29 -06:00
added some error handling
This commit is contained in:
parent
91b45e92cc
commit
5a3b28356b
@ -357,11 +357,16 @@ GMainWindow::GMainWindow(Core::System& system_)
|
||||
for (; i < args.size(); i++){
|
||||
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
||||
i++;
|
||||
QFileInfo outputPath(args[i]);
|
||||
if (outputPath.isDir()){
|
||||
cli_out_path = args[i];
|
||||
if (i < args.size()){
|
||||
QFileInfo outputPath(args[i]);
|
||||
if (outputPath.isDir()){
|
||||
cli_out_path = args[i];
|
||||
} else {
|
||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||
QTextStream(stderr) << "Error: No directory specified";
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
@ -393,11 +398,16 @@ GMainWindow::GMainWindow(Core::System& system_)
|
||||
for (; i < args.size(); i++){
|
||||
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
||||
i++;
|
||||
QFileInfo outputPath(args[i]);
|
||||
if (outputPath.isDir()){
|
||||
cli_out_path = args[i];
|
||||
if (i < args.size()){
|
||||
QFileInfo outputPath(args[i]);
|
||||
if (outputPath.isDir()){
|
||||
cli_out_path = args[i];
|
||||
} else {
|
||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||
QTextStream(stderr) << "Error: No directory specified";
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user