Changeset 784 for cpp/frams


Ignore:
Timestamp:
05/19/18 15:45:12 (7 years ago)
Author:
Maciej Komosinski
Message:

Separate messages for "string too long" and "value too big"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/param/param.h

    r745 r784  
    99#include <stdint.h>
    1010#include <frams/util/sstring.h>
     11#include <frams/util/sstringutils.h>
    1112#include <frams/util/list.h>
    1213#include <frams/util/statrick.h>
     
    296297                        SString svaluetoset = SString::valueOf(valuetoset); //converts any type to SString
    297298                        SString actual = get(i);
    298                         logPrintf("Param", "set", LOG_WARN, "Setting '%s.%s = %s' exceeded allowed range (too %s). Adjusted to %s.",
    299                                 getName(), id(i), svaluetoset.c_str(), (setflags&PSET_HITMAX) ? "big" : "small", actual.c_str());
     299                        bool s_type = type(i)[0] == 's';
     300                        logPrintf("Param", "set", LOG_WARN, "Setting '%s.%s = %s' exceeded allowed range (too %s). %s to %s.",
     301                                getName(), id(i), sstringShorten(svaluetoset, 30).c_str(), (setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted", sstringShorten(actual, 30).c_str());
    300302                }
    301303        }
Note: See TracChangeset for help on using the changeset viewer.