How would I pass an object by reference to a try block? I am working with image sets in OpenGL and I would like to pass one to a try block to handle exceptions caused by the image loading incorrectly.
Please elaborate what do you have problem with? try block isn't a function, does not need arguments and have access to all variables, enclosing block have.