mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-14 17:35:39 +02:00
Replace most naked throws with macros from catch_enforce.h
This is a first step towards support a no-exceptions mode
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
|
||||
|
||||
#include "../internal/catch_enforce.h"
|
||||
#include "../internal/catch_interfaces_reporter.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -33,7 +34,7 @@ namespace Catch {
|
||||
{
|
||||
m_reporterPrefs.shouldRedirectStdOut = false;
|
||||
if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )
|
||||
throw std::domain_error( "Verbosity level not supported by this reporter" );
|
||||
CATCH_ERROR( "Verbosity level not supported by this reporter" );
|
||||
}
|
||||
|
||||
ReporterPreferences getPreferences() const override {
|
||||
@@ -148,7 +149,7 @@ namespace Catch {
|
||||
{
|
||||
m_reporterPrefs.shouldRedirectStdOut = false;
|
||||
if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )
|
||||
throw std::domain_error( "Verbosity level not supported by this reporter" );
|
||||
CATCH_ERROR( "Verbosity level not supported by this reporter" );
|
||||
}
|
||||
~CumulativeReporterBase() override = default;
|
||||
|
||||
|
Reference in New Issue
Block a user