cwCommon.h,cwCsv.h,cwObject.h,cwUi.cpp : Changed result code kLabelNotFoundRC to kEleNotFoundRC.

This commit is contained in:
kevin 2024-02-08 10:55:48 -05:00
parent 3319804d60
commit 611c198197
4 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ namespace cw
kOpFailRC, // 19
kSyntaxErrorRC, // 20
kBufTooSmallRC, // 21
kLabelNotFoundRC, // 22 - use by cwObject to indicate that an optional value does not exist.
kEleNotFoundRC, // 22 - use by cwObject to indicate that an optional value does not exist.
kDuplicateRC, // 23 - an invalid duplicate was detected
kAssertFailRC, // 24 - used with cwLogFatal
kInvalidDataTypeRC, // 25

View File

@ -237,7 +237,7 @@ namespace cw
for(unsigned i=0; i<titleN; ++i)
if( _title_to_col_index( p, titleA[i] ) == kInvalidIdx )
{
rc = cwLogError(kLabelNotFoundRC,"The required column '%s' does not exist.",titleA[i]);
rc = cwLogError(kEleNotFoundRC,"The required column '%s' does not exist.",titleA[i]);
goto errLabel;
}

View File

@ -211,7 +211,7 @@ namespace cw
if( cwIsNotFlag(flags, kOptionalFl) )
return cwLogError(kInvalidIdRC,"The pair label '%s' could not be found.",cwStringNullGuard(label));
return kLabelNotFoundRC;
return kEleNotFoundRC;
}
return o->value(v);
@ -226,7 +226,7 @@ namespace cw
rc_t rc = get(label,valRef,flags);
// if no error occurred ....
if( rc == kOkRC || (rc == kLabelNotFoundRC && cwIsFlag(flags,kOptionalFl)))
if( rc == kOkRC || (rc == kEleNotFoundRC && cwIsFlag(flags,kOptionalFl)))
rc = _getv(flags, std::forward<ARGS>(args)...); // ... recurse to find next label/value pair
else
rc = cwLogError(rc,"Object parse failed for the pair label:'%s'.",cwStringNullGuard(label));

View File

@ -697,7 +697,7 @@ namespace cw
if((rc = o->get("name",eleName, cw::kOptionalFl)) != kOkRC )
{
// div's and titles don't need a 'name'
if( rc == kLabelNotFoundRC && (divAliasFl || textCompare(eleType,"label")==0) )
if( rc == kEleNotFoundRC && (divAliasFl || textCompare(eleType,"label")==0) )
rc = kOkRC;
else
{
@ -2225,7 +2225,7 @@ cw::rc_t cw::ui::ws::parseArgs( const object_t& o, args_t& args, const char* ob
op = &o;
else
if((op = o.find(object_label)) == nullptr )
return cwLogError(kLabelNotFoundRC,"The ui configuration label '%s' was not found.", cwStringNullGuard(object_label));
return cwLogError(kEleNotFoundRC,"The ui configuration label '%s' was not found.", cwStringNullGuard(object_label));
if((rc = op->getv(
"physRootDir", args.physRootDir,