Home:ALL Converter>what does what() const throw mean?

what does what() const throw mean?

Ask Time:2020-05-10T17:04:11         Author:KansaiRobot

Json Formatter

In C++ concurrency in Action page 45 I have this code

#include <exception>
#include <memory>

struct empty_stack: std::exception
{
   const char* what() const throw();  //<--- what does this mean?
}

Can anyone tell me what does this mean?

this empty_stack exception is being thrown by another function if a stack is empty, such as

if(data.empty()) throw empty_stack();

but what does the line inside mean?

EDIT:

Someone posted (but was removed! wonder why) this link Thanks!

Author:KansaiRobot,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61709498/what-does-what-const-throw-mean
yy