Opened 13 years ago
Closed 13 years ago
#3927 closed Bugs (fixed)
system_error::what() doesn't incorporate code.message() if this->code().value() == 0
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | system |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
if error_code is given 0 as the first argument then system_error::what() ignores code().message().
This piece of code
boost::system::error_code const ec(0, boost::system::system_category); boost::system::system_error se(ec); cout << se.what() << endl;
will not print anything. "Success" is expected.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
This patch fixes the bug. Tested on linux with gcc-4.4.2 and freebsd with gcc-4.2.1