X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fsquirrel_error.cpp;h=672ca257759bb000a5c5da9680965cf8fa03d9af;hb=2b318b2284a78ae34a6752a807c4eb7b5632299c;hp=f7d45e435a9387ada0066076910c3f8c851d0375;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/scripting/squirrel_error.cpp b/src/scripting/squirrel_error.cpp index f7d45e435..672ca2577 100644 --- a/src/scripting/squirrel_error.cpp +++ b/src/scripting/squirrel_error.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "squirrel_error.hpp" +#include "scripting/squirrel_error.hpp" #include -namespace Scripting -{ +namespace Scripting { -SquirrelError::SquirrelError(HSQUIRRELVM v, const std::string& message) throw() +SquirrelError::SquirrelError(HSQUIRRELVM v, const std::string& message) throw() : + message() { std::ostringstream msg; msg << "Squirrel error: " << message << " ("; @@ -39,8 +34,8 @@ SquirrelError::SquirrelError(HSQUIRRELVM v, const std::string& message) throw() { sq_getstring(v, -1, &lasterr); } - sq_pop(v, 1); msg << lasterr << ")"; + sq_pop(v, 1); this->message = msg.str(); } @@ -54,3 +49,5 @@ SquirrelError::what() const throw() } } + +/* EOF */