Hey #cpp, how would you refactor the code in the picture without changing its behavior?pic.twitter.com/1t982nmEsB
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
How do you best handle libraries then that do return errors?
You say that as if I use libraries.
I feel uncomfortable about this approach because it's very easy to forget to check if an error happened, and neither the compiler nor the type system can help you out if you do.
It's better to seek a clean and easy to read solution, that might not be "perfect" in that sense, rather than an unwieldy and hard to maintain solution covering the 0.01% case that doesn't occur in practice
When running non-final builds I prefer to crash on error and push a well written error message to the log. If the error is not fatal then it is a warning and I also push it to the log file. I think error messages are a good opportunity to write useful documentation.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.