Added signal handlers (and placeholder for SEH handlers)

- based on PR 232 (https://github.com/philsquared/Catch/pull/232 - thanks Lukasz Forynski)
- Writes to reporter, so gets all the usual context, but then exits directly (since the stack cannot be resumed) so no summary
- On Windows does nothing, as yet.
This commit is contained in:
Phil Nash
2014-08-22 08:07:39 +01:00
parent aa31d1c275
commit c1a8e1c5dd
10 changed files with 128 additions and 8 deletions

View File

@@ -109,6 +109,13 @@ namespace Catch {
printExpressionWas();
printRemainingMessages();
break;
case ResultWas::FatalErrorCondition:
printResultType( Colour::Error, failedString() );
printIssue( "fatal error condition with message:" );
printMessage();
printExpressionWas();
printRemainingMessages();
break;
case ResultWas::DidntThrowException:
printResultType( Colour::Error, failedString() );
printIssue( "expected exception, got none" );