clear-code/cutter — pull request #8 by kz0817 (2014-01-18 10:06:53+00:00)
Title: Catch unhandled C++ exceptions and avoid a crash

Although cutter supports a test of C++ code, it crashes when a C++
exception is leaked outside of a test case. However, some C++
libraries and programs use an exception to notify an error.

A workaround by surrounding with a try-catch block makes simplicity
of test code degrade. In addition, different from Java, C++ doesn't
mandate an declaration of exceptions that may be thrown. As a result,
unexpected exceptions sometimes appear from deep within the call stack.

This patch catches C++ exceptions at right outside of a test
case without any additional lines of a test case (i.e. maintains
compatibility of test code), and labels the test as an error.