PageRenderTime 132ms CodeModel.GetById 11ms app.highlight 60ms RepoModel.GetById 42ms app.codeStats 0ms

/cln-1.3.2/src/base/input/cl_read_bad_syntax_exception.cc

#
C++ | 32 lines | 19 code | 9 blank | 4 comment | 2 complexity | 5f7d68baf58d0853ff1c7151ba30afc5 MD5 | raw file
Possible License(s): GPL-2.0
 1// read_number_bad_syntax_exception().
 2
 3// General includes.
 4#include "base/cl_sysdep.h"
 5
 6// Specification.
 7#include "cln/number_io.h"
 8
 9
10// Implementation.
11
12#include <sstream>
13#include "cln/io.h"
14
15namespace cln {
16
17static inline const std::string
18read_number_bad_syntax_msg (const char * string, const char * string_limit)
19{
20	std::ostringstream buf;
21	fprint(buf, "Illegal number syntax: \"");
22	for (const char * ptr = string; ptr != string_limit; ptr++)
23		fprintchar(buf, *ptr);
24	fprint(buf, "\"");
25	return buf.str();
26}
27
28read_number_bad_syntax_exception::read_number_bad_syntax_exception (const char * string, const char * string_limit)
29	: read_number_exception(read_number_bad_syntax_msg(string, string_limit))
30{}
31
32}  // namespace cln