Quantcast
Channel: Error checking in function that returns reference to static variable - Code Review Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by Martin York for Error checking in function that returns reference...

The only things I would change are: // Move this boolean to the top. // So if you throw an exception that is not caught // you then stil know that you have tried. hasTriedLoadingPath = true; try { //...

View Article



Error checking in function that returns reference to static variable

This is a function I just wrote with the goal to only load the desired information once, and if an error occurs, save it for later so that it can always be reported to a calling function.It does what I...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images