Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error instead of warning #59

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/functionloading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function debug_opengl_expr(func_name, args)
err = glGetError()
if err != GL_NO_ERROR
arguments = gl_represent.(tuple($(args...)))
@warn("OpenGL call to $($func_name), with arguments: $(arguments)
error("OpenGL call to $($func_name), with arguments: $(arguments)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
error("OpenGL call to $($func_name), with arguments: $(arguments)
@error("OpenGL call to $($func_name), with arguments: $(arguments)

you need the macro for the stacktrace, I think

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this just interrupts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you get an error & stacktrace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, looks like it worked

Failed with error: $(GLENUM(err).name).")
end
end
Expand Down