projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b7bad5
)
more explanations when sprites failed to load
author
Matthias Braun
<matze@braunis.de>
Wed, 31 Jan 2007 16:23:58 +0000
(16:23 +0000)
committer
Matthias Braun
<matze@braunis.de>
Wed, 31 Jan 2007 16:23:58 +0000
(16:23 +0000)
SVN-Revision: 4758
src/sprite/sprite_manager.cpp
patch
|
blob
|
history
diff --git
a/src/sprite/sprite_manager.cpp
b/src/sprite/sprite_manager.cpp
index
5b37441
..
0878e62
100644
(file)
--- a/
src/sprite/sprite_manager.cpp
+++ b/
src/sprite/sprite_manager.cpp
@@
-69,7
+69,16
@@
SpriteData*
SpriteManager::load(const std::string& filename)
{
lisp::Parser parser;
SpriteManager::load(const std::string& filename)
{
lisp::Parser parser;
- std::auto_ptr<lisp::Lisp> root (parser.parse(filename));
+ std::auto_ptr<lisp::Lisp> root;
+
+ try {
+ root.reset(parser.parse(filename));
+ } catch(const std::exception& e) {
+ std::ostringstream msg;
+ msg << "Parse error when trying to load sprite '" << filename
+ << "': " << e.what() << "\n";
+ throw std::runtime_error(msg.str());
+ }
const lisp::Lisp* sprite = root->get_lisp("supertux-sprite");
if(!sprite) {
const lisp::Lisp* sprite = root->get_lisp("supertux-sprite");
if(!sprite) {