Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1031


Ignore:
Timestamp:
Apr 12, 2008, 3:56:36 PM (17 years ago)
Author:
landauf
Message:

corrected debug output in case of an invalid vector index
(remember: don't use COUT(x) inside an if/else block without using braces - it's a macro using 'if' itself)

Location:
code/branches/core2/src/orxonox/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/ConfigValueContainer.cc

    r1030 r1031  
    153153            {
    154154                if (!success)
     155                {
    155156                    COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
     157                }
    156158                else
     159                {
    157160                    COUT(1) << "Error: Invalid vector-index." << std::endl;
     161                }
    158162                return false;
    159163            }
     
    275279
    276280            if (!success || index < 0 || index > MAX_VECTOR_INDEX)
     281            {
     282                if (!success)
     283                {
     284                    COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
     285                }
     286                else
     287                {
     288                    COUT(1) << "Error: Invalid vector-index." << std::endl;
     289                }
    277290                return false;
     291            }
    278292
    279293            if (token.size() >= 2)
  • code/branches/core2/src/orxonox/core/ConfigValueIncludes.h

    r1030 r1031  
    8282    } \
    8383    else \
    84         COUT(2) << "Warning: Couldn't reset variable " << #varname << ", corresponding container doesn't exist." << std::endl
     84    { \
     85        COUT(2) << "Warning: Couldn't reset variable " << #varname << ", corresponding container doesn't exist." << std::endl; \
     86    }
    8587
    8688/**
  • code/branches/core2/src/orxonox/core/Language.cc

    r1030 r1031  
    253253                    this->createEntry(lineString.substr(0, pos), lineString.substr(pos + 1));
    254254                else
     255                {
    255256                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->defaultLanguage_) << std::endl;
     257                }
    256258            }
    257259        }
     
    305307                }
    306308                else
     309                {
    307310                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->language_) << std::endl;
     311                }
    308312            }
    309313        }
Note: See TracChangeset for help on using the changeset viewer.