Boost C++ Libraries: Ticket #10699: Add a build flag to increase the size of REPORT_ERROR_BUFFER_SIZE https://svn.boost.org/trac10/ticket/10699 <p> Hi, </p> <p> Before requesting anything, please let me say that I've been using the Boost.Test library for more than 5 years and it is just great, thanks a lot! </p> <p> And the small question or request: Do you think that is a good idea to add a building flag or macro to tune the <code>REPORT_ERROR_BUFFER_SIZE</code>? </p> <p> The idea is just to add some lines like these in the file <code>test/impl/execution_monitor.ipp</code>: </p> <pre class="wiki">#ifdef BOOST_TEST_ERROR_SIZE_VALUE #define REPORT_ERROR_BUFFER_SIZE BOOST_TEST_ERROR_SIZE_VALUE #else #define REPORT_ERROR_BUFFER_SIZE 512 #endif </pre><p> And remove/replace the <code>static const int REPORT_ERROR_BUFFER_SIZE</code> of function <code>report_error</code>, of course. </p> <p> Does it has any sense to you? </p> <p> Thanks! </p> <p> Albert </p> <p> PS: I assume that it's not possible to use "string" to hold any length of message, right? </p> <p> PS: We need longer messages because in debug mode our exceptions print a backtrace, and 512 chars is just too few... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10699 Trac 1.4.3 maxim.yegorushkin@… Wed, 29 Oct 2014 13:56:12 GMT <link>https://svn.boost.org/trac10/ticket/10699#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10699#comment:1</guid> <description> <p> I second that because this limited buffer size truncates my nice stack traces from exceptions and I have to fire up gdb to find the full stack trace, e.g.: </p> <pre class="wiki">cd /home/max/otsquant/build/Linux-x86_64-64.g++-debug/test-results &amp;&amp; /home/max/otsquant/build/Linux-x86_64-64.g++-debug/test/fix_db_connection_test --log_level=test_suite Running 1 test case... Entering test suite "fix" Entering test case "insert" unknown location(0): fatal error in "insert": std::runtime_error: ot::Ex&lt;std::runtime_error, void&gt;: SQLExecDirect(): (-1)[42601][7]ERROR: syntax error at or near "\"; Error while executing the query StackTrace(20 frames): 0: ot::odbc::detail::throw_on_odbc_error(short, void*, short, char const*)(/home/max/otsquant/src/c++/util/odbc.cc:56) 1: ot::odbc::detail::Handle&lt;void*, (short)3&gt;::verify(short, char const*) const(/home/max/otsquant/src/c++/util/odbc.h:124) 2: ot::odbc::StatementHandle::execute(char const*)(/home/max/otsquant/src/c++/util/odbc.c &lt;---- truncate here Leaving test case "insert"; testing time: 11861mks Leaving test suite "fix" </pre><p> A proper fix would be to make the buffer size dynamic and remove any limits. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Tue, 07 Jul 2015 15:32:13 GMT</pubDate> <title>status, version, milestone changed; resolution set https://svn.boost.org/trac10/ticket/10699#comment:2 https://svn.boost.org/trac10/ticket/10699#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost Development Trunk</span> → <span class="trac-field-new">Boost Release Branch</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> <p> This is changed to 4096. hopefully this is enough for your purposes </p> Ticket maxim.yegorushkin@… Wed, 08 Jul 2015 17:37:32 GMT <link>https://svn.boost.org/trac10/ticket/10699#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10699#comment:3</guid> <description> <p> Well, this fix smacks of "640K ought to be enough for anyone." </p> <p> Remove the limit or make it configurable, please. </p> </description> <category>Ticket</category> </item> <item> <author>Albert Gil <albert.gil@…></author> <pubDate>Thu, 09 Jul 2015 11:20:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10699#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10699#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10699#comment:2" title="Comment 2">rogeeff</a>: </p> <blockquote class="citation"> <p> This is changed to 4096. hopefully this is enough for your purposes </p> </blockquote> <p> It probably is...<br /> And in fact I already used this as workaround some times. </p> <p> But I think that this is not an actual fix, right? </p> <p> What do you think about the solution proposed in the <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10699#10699" title="#10699: Feature Requests: Add a build flag to increase the size of REPORT_ERROR_BUFFER_SIZE (closed: fixed)">description</a>?<br /> Altough doing it dynamic is for sure the best solution, the usage of a build parameter (define/macro) seems to me as a small patch and useful enogh? </p> <p> Thanks! </p> <p> Albert </p> <p> PD: This is a duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7046" title="#7046: Feature Requests: Output full error message, not just 512 chars (closed: fixed)">#7046</a>? I didn't found it when I created the ticket... </p> </description> <category>Ticket</category> </item> </channel> </rss>