msg in stack frame
| 102 | |
| 103 | // msg in stack frame |
| 104 | Maybe<std::string> FormatMsgOfStackFrame(std::string error_msg, bool is_last_stack_frame) { |
| 105 | const bool debug_mode = GetGraphDebugMode(); |
| 106 | // only shorten the message if it is not the last stack frame AND not in debug mode |
| 107 | if (!is_last_stack_frame && !debug_mode) { error_msg = *JUST(ShortenMsg(error_msg)); } |
| 108 | // error_msg of last stack frame come from "<<" |
| 109 | if (is_last_stack_frame) { error_msg = StripSpace(error_msg); } |
| 110 | std::stringstream ss; |
| 111 | if (!error_msg.empty()) { ss << "\n " << error_msg; } |
| 112 | return ss.str(); |
| 113 | } |
| 114 | |
| 115 | // the msg in error type instance. |
| 116 | Maybe<std::string> FormatMsgOfErrorType(const std::shared_ptr<StackedError>& error) { |
no test coverage detected