For slicing, the general rule in C++ is whenever you have a value object, polymorphism does not apply. A value object is always whatever its compile-time type is - after all, it's just a value, it can't represent some other "thing" that's off in some other memory space. Polymorphism only applies with pointers and references.
Remember this rule and the throws behavior makes perfect sense, as do a lot of other C++ gotchas.
Remember this rule and the throws behavior makes perfect sense, as do a lot of other C++ gotchas.