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

View file

@ -104,7 +104,8 @@ T_StringBuilder& ebcl::operator<< (
void T_SRDErrors::checkAdded(
T_SRDError const& last )
{
if ( last.isDetails( ) || errCount_ >= MAX_ERRORS ) {
if ( last.type( ) != E_SRDErrorType::ERROR
|| errCount_ >= MAX_ERRORS ) {
return;
}
errCount_ ++;
@ -128,7 +129,7 @@ void T_SRDErrors::addAll(
RPC_SRDLocation lastLocation = nullptr;
for ( uint32_t i = 0 ; i < nErrors ; i ++ ) {
errors_.add( source[ i ] );
if ( !source[ i ].isDetails( ) ) {
if ( source[ i ].type( ) == E_SRDErrorType::ERROR ) {
lastLocation = &source[ i ].location( );
}
}