mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-07-09 17:24:49 -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++){
|
for (; i < args.size(); i++){
|
||||||
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
||||||
i++;
|
i++;
|
||||||
QFileInfo outputPath(args[i]);
|
if (i < args.size()){
|
||||||
if (outputPath.isDir()){
|
QFileInfo outputPath(args[i]);
|
||||||
cli_out_path = args[i];
|
if (outputPath.isDir()){
|
||||||
|
cli_out_path = args[i];
|
||||||
|
} else {
|
||||||
|
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
QTextStream(stderr) << "Error: No directory specified";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -393,11 +398,16 @@ GMainWindow::GMainWindow(Core::System& system_)
|
|||||||
for (; i < args.size(); i++){
|
for (; i < args.size(); i++){
|
||||||
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
if (args[i] == QStringLiteral("-o") || args[i] == QStringLiteral("--output")){
|
||||||
i++;
|
i++;
|
||||||
QFileInfo outputPath(args[i]);
|
if (i < args.size()){
|
||||||
if (outputPath.isDir()){
|
QFileInfo outputPath(args[i]);
|
||||||
cli_out_path = args[i];
|
if (outputPath.isDir()){
|
||||||
|
cli_out_path = args[i];
|
||||||
|
} else {
|
||||||
|
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
QTextStream(stderr) << "Error: " << args[i] << " is not a directory!\n";
|
QTextStream(stderr) << "Error: No directory specified";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user