
3 Feb
2007
3 Feb
'07
10:19 p.m.
Hello Steven, Sunday, February 4, 2007, 1:02:12 AM, you wrote:
AMDG
Andrey Semashev <andysem <at> mail.ru> writes:
And maybe a good idea is to pass an actual value that triggered the default handler in the exception object.
Do you think I should store the value as an integer or lexical_cast it to a string and pass it to the constructor of std::runtime_error? If I store it as an integer, no matter what type I use, it could overflow.
I think the value should be in the error message. But you also can store it as intmax_t value in the exception. I think, this would be sufficient for 99% cases. -- Best regards, Andrey mailto:andysem@mail.ru