X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramdata.cpp;fp=source%2Fprogramdata.cpp;h=f454fe5145f595ed1cd6c62488c5b433aaba9a83;hp=68820c59cc9fd0fd829792ebf547190d23c0fe9f;hb=9f00daecc2517aa8fd5a6e4545b2db3f2fff985d;hpb=47853d7a557bf81131512832a9e531cb04d273ca diff --git a/source/programdata.cpp b/source/programdata.cpp index 68820c59..f454fe51 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include "buffer.h" #include "color.h" #include "error.h" @@ -92,10 +94,15 @@ void ProgramData::uniform(const string &name, Uniform *uni) else if(name[name.size()-1]==']') throw invalid_argument("ProgramData::uniform"); } - catch(...) + catch(const exception &e) { delete uni; +#ifdef DEBUG + IO::print(IO::cerr, "Error while setting uniform %s: %s: %s\n", name, Debug::demangle(typeid(e).name()), e.what()); + return; +#else throw; +#endif } int i = find_uniform_index(name);