Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configfile include
12-23-2010, 11:18 AM,
#9
 
I noticed that the test config files you added do not end with newlines. I added a check for this and it passes fine. I guess getline will happily substitute EOF for a delimiter.

It seems like there are no conditions where the funciton bool CONFIG::Load(std::istream & f) will return false. Should it complain about 0-length input, perhaps?

To do much more checking than that, we'd have to make ProcessLine return false when it is unhappy about something. There isn't any error checking in ProcessLine. I know that the class is intended to be hard to break and take almost any input, and I can't think of many ways in which it should produce an error. Maybe it should error when an include fails to load? Or maybe it should log a warning and move on...?
Reply


Messages In This Thread
Configfile include - by thelusiv - 12-22-2010, 02:35 AM
[No subject] - by NaN - 12-22-2010, 06:45 AM
[No subject] - by thelusiv - 12-22-2010, 10:17 AM
[No subject] - by NaN - 12-22-2010, 11:54 AM
[No subject] - by thelusiv - 12-22-2010, 01:12 PM
[No subject] - by NaN - 12-22-2010, 02:47 PM
[No subject] - by thelusiv - 12-23-2010, 08:40 AM
[No subject] - by NaN - 12-23-2010, 09:08 AM
[No subject] - by thelusiv - 12-23-2010, 11:18 AM
[No subject] - by NaN - 12-23-2010, 12:00 PM
[No subject] - by thelusiv - 12-27-2010, 02:43 AM
[No subject] - by joevenzon_phpbb2_import3 - 12-27-2010, 11:37 AM
[No subject] - by NaN - 12-27-2010, 08:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)