Opened 13 years ago

Closed 12 years ago

#4019 closed Feature Requests (fixed)

improve interprocess exception what() string

Reported by: Marty Olevitch <marty@…> Owned by: Ion Gaztañaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc: joseph.h.garvin@…

Description

Dear Ion,

I am planning to use your message_queues in new project and like it. However, I find the exception messages not very useful.

One problem may be that in interprocess/exception.hpp, the constructor

interprocess_exception(error_code_t ec = other_error )

always sets the m_str value (which is returned by the what() member function) to the same phrase

boost::interprocess_exception::library_error

Better would be something that is appropriate for each type of error, for example:

message_queue receive: buffer_size (1) < max_msg_size (100)

There are only a few places where exceptions are thrown in message_queue.hpp. Would it be possible to have for each of them more useful error messages for the what() strings?

Change History (2)

comment:1 by joseph.h.garvin@…, 13 years ago

Cc: joseph.h.garvin@… added

In general, all the places where an interprocess_exception is thrown it would be helpful if there was a nice what() message. At least in 1.41 most of them seem to be empty.

comment:2 by Ion Gaztañaga, 12 years ago

Milestone: Boost 1.43.0Boost-1.45.0
Resolution: fixed
Status: newclosed

Some messages added for Boost 1.45 in release branch

Note: See TracTickets for help on using tickets.