SRD errors - Errors, warnings and notes

Replaced the "details" flag with a type which indicates whether an error
record contains an actual error, a warning or just a note.
This commit is contained in:
Emmanuel BENOîT 2017-12-02 09:16:17 +01:00
parent 86a3fe34b4
commit 53feddb4ee
3 changed files with 22 additions and 13 deletions
include/ebcl/inline

View file

@ -117,10 +117,10 @@ inline T_SRDLocationChaining const& T_SRDLocation::chaining( ) const noexcept
inline T_SRDError::T_SRDError(
T_String error ,
T_SRDLocation location ,
const bool details ) noexcept
const E_SRDErrorType type ) noexcept
: error_( std::move( error ) ) ,
location_( std::move( location ) ) ,
isDetails_( details )
type_( type )
{ }
/*----------------------------------------------------------------------------*/
@ -129,7 +129,7 @@ inline T_SRDError::T_SRDError(
T_SRDError const& other ) noexcept
: error_( other.error_ ) ,
location_( other.location_ ) ,
isDetails_( other.isDetails_ )
type_( other.type_ )
{ }
inline T_SRDError& T_SRDError::operator= (
@ -137,7 +137,7 @@ inline T_SRDError& T_SRDError::operator= (
{
error_ = other.error_;
location_ = other.location_;
isDetails_ = other.isDetails_;
type_ = other.type_;
return *this;
}
@ -164,7 +164,7 @@ inline M_DECLARE_SWAP( T_SRDError )
using std::swap;
swap( lhs.error_ , rhs.error_ );
swap( lhs.location_ , rhs.location_ );
swap( lhs.isDetails_ , rhs.isDetails_ );
swap( lhs.type_ , rhs.type_ );
}
/*----------------------------------------------------------------------------*/
@ -179,9 +179,9 @@ inline T_SRDLocation const& T_SRDError::location( ) const noexcept
return location_;
}
inline bool T_SRDError::isDetails( ) const noexcept
inline E_SRDErrorType T_SRDError::type( ) const noexcept
{
return isDetails_;
return type_;
}