boostorg / interprocess

Boost.org interprocess module
http://boost.org/libs/interprocess
132 stars 117 forks source link

Remove exception from normal execution path #159

Open daravi opened 2 years ago

daravi commented 2 years ago

As it is, using boost::interprocess::open_or_create in the constructors can lead to exceptions that are internally caught. This makes debugging hard as I have to skip those exceptions until I get to an actual "exception". IMO an "exception" should only be thrown in exceptional circumstances and not during normal operation.

If possible please add a way check if a shared memory segment exists given the key without needing to throw an exception. I think this would also help with the usability of the library.