示例#1
0
文件: exception.cpp 项目: avigad/lean
char const * stack_space_exception::what() const noexcept {
    std::string & buffer = get_g_buffer();
    std::ostringstream s;
    s << "deep recursion was detected at '" << m_component_name << "' (potential solution: increase stack space in your system)";
    buffer = s.str();
    return buffer.c_str();
}
示例#2
0
文件: exception.cpp 项目: avigad/lean
char const * memory_exception::what() const noexcept {
    std::string & buffer = get_g_buffer();
    std::ostringstream s;
    s << "excessive memory consumption detected at '" << m_component_name << "' (potential solution: increase memory consumption threshold)";
    buffer = s.str();
    return buffer.c_str();
}
示例#3
0
char const * parser_exception::what() const noexcept {
    try {
        std::string & buffer = get_g_buffer();
        std::ostringstream s;
        s << m_fname << ":" << m_line << ":" << m_pos << ": error: " << m_msg;
        buffer = s.str();
        return buffer.c_str();
    } catch (std::exception & ex) {
        // failed to generate extended message
        return m_msg.c_str();
    }
}