- Timestamp:
- 09/09/23 15:22:45 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r1253 r1278 554 554 } 555 555 556 static SString getFileMessageFor(VirtFILE* f, ParamInterface::LoadOptions &options) 557 { 558 SString fileinfo; 559 const char* fname = f->VgetPath(); 560 if (fname != NULL) 561 { 562 fileinfo = SString::sprintf(" while reading from '%s'", fname); 563 if (options.linenum) 564 fileinfo += SString::sprintf(" (line %d)", *options.linenum); 565 } 566 return fileinfo; 567 } 568 556 569 int ParamInterface::loadMultiLine(VirtFILE* f, LoadOptions &options) 557 570 { … … 600 613 if (seen[i]) 601 614 { 602 SString fileinfo; 603 const char* fname = f->VgetPath(); 604 if (fname != NULL) 605 { 606 fileinfo = SString::sprintf(" while reading from '%s'", fname); 607 if (options.linenum) 608 fileinfo += SString::sprintf(" (line %d)", *options.linenum); 609 } 615 SString fileinfo = getFileMessageFor(f,options); 610 616 logPrintf("ParamInterface", "load", LOG_WARN, "Multiple '%s.%s' properties found%s", getName(), id(i), fileinfo.c_str()); 611 617 } … … 616 622 if (p0[p_len + 1] == '~') 617 623 { 624 if (p0[p_len+2]) 625 { 626 SString fileinfo = getFileMessageFor(f,options); 627 logPrintf("ParamInterface", "load", LOG_WARN, "Ignored unexpected characters after '~': '%s' in '%s:'%s", p0+p_len+1, id(i), fileinfo.c_str()); 628 } 629 618 630 SString s; 619 631 if (!readUntilTilde(f, s))
Note: See TracChangeset
for help on using the changeset viewer.