Skip to content

Commit

Permalink
more verbose errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cgytrus committed Sep 12, 2023
1 parent daf917d commit c96e6ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ struct Shader {
) {
auto vertexSource = file::readString(vertexPath);
if (!vertexSource)
return Err(vertexSource.unwrapErr());
return Err("failed to read vertex shader at path {}: {}", vertexPath.string(), vertexSource.unwrapErr());

auto fragmentSource = file::readString(fragmentPath);
if (!fragmentSource)
return Err(fragmentSource.unwrapErr());
return Err("failed to read fragment shader at path {}: {}", fragmentPath.string(), fragmentSource.unwrapErr());

auto getShaderLog = [](GLuint id) -> std::string {
GLint length, written;
Expand Down Expand Up @@ -194,7 +194,7 @@ void setupPostProcess() {

auto res = ppShader.setup(vertexPath, fragmentPath);
if (!res) {
log::error("{}", res.unwrapErr());
log::error("Failed to set up shader: {}", res.unwrapErr());
return;
}
log::info("{}", res.unwrap());
Expand Down

0 comments on commit c96e6ee

Please sign in to comment.