ShaderCompiler: Don't return success if compilation failed
This commit is contained in:
parent
21a38fb31b
commit
00f11a74dc
|
|
@ -170,6 +170,8 @@ int main(int argc, char* argv[])
|
||||||
Nz::LangWriter nzslWriter;
|
Nz::LangWriter nzslWriter;
|
||||||
fmt::print("{}", nzslWriter.Generate(*shaderModule));
|
fmt::print("{}", nzslWriter.Generate(*shaderModule));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
catch (const Nz::ShaderLang::Error& error)
|
catch (const Nz::ShaderLang::Error& error)
|
||||||
{
|
{
|
||||||
|
|
@ -243,16 +245,18 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fmt::print(stderr, (fmt::emphasis::bold | fg(fmt::color::red)), "{}\n", error.what());
|
fmt::print(stderr, (fmt::emphasis::bold | fg(fmt::color::red)), "{}\n", error.what());
|
||||||
|
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const cxxopts::OptionException& e)
|
catch (const cxxopts::OptionException& e)
|
||||||
{
|
{
|
||||||
fmt::print(stderr, "{}\n{}\n", e.what(), options.help());
|
fmt::print(stderr, "{}\n{}\n", e.what(), options.help());
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
fmt::print(stderr, "{}\n", e.what());
|
fmt::print(stderr, "{}\n", e.what());
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue