Hacker News new | ask | show | jobs
by Rygian 1513 days ago
"Bubbling up" is the default in C++, when the code you call throws an exception and you don't have a try/catch for it.
3 comments

Do C++ people actually call it "bubbling up"? I don't think I've used a language where this isn't the default behaviour so I'm not sure I've ever heard it given an actual name, it's just what happens when you don't catch the exception - it keeps going until someone does catch it, or it hits the runtime and demolishes your program.
I've heard "propagating" the exception used as well.
Now that you mention it, I think this is the term I've heard for it when it has been mentioned. The exception propagates upwards.
Yes, but not just in C++. Bubbling up errors is a common phrase in Java and Python.
I often use and hear "bubbling up" in non-tech discussions, too. It's not at all uncommon, IMO.
I've heard this term more often in JS contexts than in C++ contexts, to be honest. I don't think C++ programmers use the term all that often, though the reference to error propagation will probably be understood anyway.
Bubbling is what my guts do when they're unhappy. Not a great programming term.