I am having trouble setting up the following to successfully catch an exception (and more importantly not crash my program) when a bad file name is passed. Here is the function that isn't working...
All the variables are declared correctly elsewhere. If a good name is passed, the file loads successfully.
To add a bit more clarity, this function is built to work with Allegro 5. Also, the setWidth() and setHeight() functions break if a file does not load successfully since they assume a bitmap has been 'created' into memory.