folly::rich_msg

A message that can automatically capture source locations.

Synopsis

Declared in <folly/result/rich_msg.h>

class rich_msg;

Description

Usage: rich_msg msg1{"error: {} at {}", code, line};

Member Functions

NameDescription
rich_msg [constructor]Constructors
location Returns the captured source location.
message Returns the message text.
shared_string Moves out the underlying message string.

Non-Member Functions

NameDescription
make_coded_rich_errorBuilds an error from a message and multiple codes.
make_inheriting_coded_rich_errorBuilds an error from a message and multiple codes.
make_nestable_coded_rich_errorBuilds an error from a message and multiple codes.