MongoDB  2.7.0
Public Member Functions | List of all members
mongo::ErrorMsg Class Reference

helper class that builds error strings. More...

#include <assert_util.h>

Public Member Functions

 ErrorMsg (const char *msg, char ch)
 ErrorMsg (const char *msg, unsigned val)
 operator std::string () const

Detailed Description

helper class that builds error strings.

lighter weight than a StringBuilder, albeit less flexible. NOINLINE_DECL used in the constructor implementations as we are assuming this is a cold code path when used.

example: throw UserException(123, ErrorMsg("blah", num_val));

The documentation for this class was generated from the following files: