|
From: Yoda-JM <yo...@us...> - 2010-03-30 21:44:51
|
Module: performous
Branch: master
Commit: 61587646fa32eb0f3d41c96e319bd6e66b5e1a58
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Mar 30 23:44:30 2010 +0200
Enhanced song parser exception message
---
game/songparser-sm.cc | 2 +-
game/songparser-txt.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index 811d398..fcbc224 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -89,7 +89,7 @@ bool SongParser::smParseField(std::string line) {
//Here the data contained by the current line is separated in key and value.
//However, because of the differing format of notedata the value is analyzed only if key is not NOTES
std::string::size_type pos = line.find(':');
- if (pos == std::string::npos) throw std::runtime_error("Invalid format, should be #key:value");
+ if (pos == std::string::npos) throw std::runtime_error("Invalid sm format, should be #key:value");
std::string key = boost::trim_copy(line.substr(1, pos - 1));
if (key == "NOTES") {
/*All remaining data is parsed here.
diff --git a/game/songparser-txt.cc b/game/songparser-txt.cc
index 479d00a..348bd6e 100644
--- a/game/songparser-txt.cc
+++ b/game/songparser-txt.cc
@@ -62,7 +62,7 @@ bool SongParser::txtParseField(std::string const& line) {
if (line.empty()) return true;
if (line[0] != '#') return false;
std::string::size_type pos = line.find(':');
- if (pos == std::string::npos) throw std::runtime_error("Invalid format, should be #key:value");
+ if (pos == std::string::npos) throw std::runtime_error("Invalid txt format, should be #key:value");
std::string key = boost::trim_copy(line.substr(1, pos - 1));
std::string value = boost::trim_copy(line.substr(pos + 1));
if (value.empty()) return true;
|