X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Ffmt.cpp;fp=source%2Fstrings%2Ffmt.cpp;h=7026fe0772c690830d7e0811910f0ec006b8c940;hp=e06f71ab456f40d55825345ea413bc6981d10dd6;hb=02df44f46e4aaa3989d0ee9c9e2e25f8a808e0ec;hpb=3a965c87750250c8facc9dbff02aeb3a88e19f05 diff --git a/source/strings/fmt.cpp b/source/strings/fmt.cpp index e06f71a..7026fe0 100644 --- a/source/strings/fmt.cpp +++ b/source/strings/fmt.cpp @@ -5,15 +5,15 @@ Copyright © 2006-2008 Mikko Rasa Distributed under the LGPL */ -#include #include "fmt.h" using namespace std; namespace Msp { -void Fmt::parse(const char *f) +void Fmt::parse(const char *s) { + const char *f = s; if(*f=='%') ++f; for(; *f; ++f) @@ -82,7 +82,7 @@ void Fmt::parse(const char *f) else if(*f=='i') base = AUTOBASE; else - throw InvalidParameterValue("Invalid conversion specifier"); + throw format_error(s); if(*f=='E' || *f=='F' || *f=='G' || *f=='X' || *f=='P') ucase = true; @@ -90,7 +90,7 @@ void Fmt::parse(const char *f) ++f; if(*f) - throw InvalidParameterValue("Extra characters in conversion specification"); + throw format_error(s); } Fmt &Fmt::reset()