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 kOpFailRC, // 19
kSyntaxErrorRC, // 20 kSyntaxErrorRC, // 20
kBufTooSmallRC, // 21 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 kDuplicateRC, // 23 - an invalid duplicate was detected
kAssertFailRC, // 24 - used with cwLogFatal kAssertFailRC, // 24 - used with cwLogFatal
kInvalidDataTypeRC, // 25 kInvalidDataTypeRC, // 25

View File

@ -237,7 +237,7 @@ namespace cw
for(unsigned i=0; i<titleN; ++i) for(unsigned i=0; i<titleN; ++i)
if( _title_to_col_index( p, titleA[i] ) == kInvalidIdx ) 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; goto errLabel;
} }

View File

@ -211,7 +211,7 @@ namespace cw
if( cwIsNotFlag(flags, kOptionalFl) ) if( cwIsNotFlag(flags, kOptionalFl) )
return cwLogError(kInvalidIdRC,"The pair label '%s' could not be found.",cwStringNullGuard(label)); return cwLogError(kInvalidIdRC,"The pair label '%s' could not be found.",cwStringNullGuard(label));
return kLabelNotFoundRC; return kEleNotFoundRC;
} }
return o->value(v); return o->value(v);
@ -226,7 +226,7 @@ namespace cw
rc_t rc = get(label,valRef,flags); rc_t rc = get(label,valRef,flags);
// if no error occurred .... // 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 rc = _getv(flags, std::forward<ARGS>(args)...); // ... recurse to find next label/value pair
else else
rc = cwLogError(rc,"Object parse failed for the pair label:'%s'.",cwStringNullGuard(label)); 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 ) if((rc = o->get("name",eleName, cw::kOptionalFl)) != kOkRC )
{ {
// div's and titles don't need a 'name' // 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; rc = kOkRC;
else else
{ {
@ -2225,7 +2225,7 @@ cw::rc_t cw::ui::ws::parseArgs( const object_t& o, args_t& args, const char* ob
op = &o; op = &o;
else else
if((op = o.find(object_label)) == nullptr ) 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( if((rc = op->getv(
"physRootDir", args.physRootDir, "physRootDir", args.physRootDir,