What does a single “throw;” statement do?

If you do a throw; on its own, and there isn’t a current exception for it to rethrow, then the program ends abruptly. (More specifically, terminate() is called.)

Note that throw; is the only safe way to re-throw the current exception – it’s not equivalent to

catch (exception const & e) { throw e; }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)