Thx for the replies!
@frob Yeah I like the [[nodiscard]] too. To me it enforces the importance of the code creator return values, as well as forcing the user to expect better, meaningful return values (or in the end none, if not required after review), hence good, properly handled code. But since return value is already optional by language default (that we have to put nodiscard manually) in the first place it's a debate to some, I've seen it somewhere after that feature arrived.
@a light breeze Great quick step and examples! On the USB example, can you elaborate why in most cases there's no point? Wouldn't there be any data corruption that maybe the user need to know? or is it because we can just cancel it and write it again nonetheless when they attach it again that it doesn't matter? I assume as an end-user, pointless notifications can be annoying too if it can be solved easily later as long as it's known to be harmless.
@taby Yes. The examples I gave were in C, though (including the link), but I'm more than okay to hear any related opinion in any language (and exception model example, if anyone uses it) including modern C++ (if that's what C++ x standard library means). If you have any comment about error handling specifically with modern C++ multithreading, please let me know. 🙂