summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6cd9984)
raw | patch | inline | side by side (parent: 6cd9984)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 17 Nov 2007 23:52:33 +0000 (23:52 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 17 Nov 2007 23:52:33 +0000 (23:52 +0000) |
src/2geom/exception.h | patch | blob | history | |
src/live_effects/effect.cpp | patch | blob | history | |
src/ui/dialog/filedialogimpl-gtkmm.cpp | patch | blob | history |
diff --git a/src/2geom/exception.h b/src/2geom/exception.h
index bd950726f9cdfb48ac8c2a1ccef96a377f7b7cb7..1a031cab9515d08c0eb0321c49f32f5f4c31cab2 100644 (file)
--- a/src/2geom/exception.h
+++ b/src/2geom/exception.h
*/
#include <exception>
+#include <sstream>
#include <string>
namespace Geom {
class Exception : public std::exception {
public:
Exception(const char * message, const char *file, const int line)
- : msgstr("Exception thrown: ")
{
- msgstr += message;
- msgstr += " (";
- msgstr += file;
- msgstr += ":";
- msgstr += line;
- msgstr += ")";
+ std::ostringstream os;
+ os << "lib2geom exception: " << message << " (" << file << ":" << line << ")";
+ msgstr = os.str();
}
virtual ~Exception() throw() {} // necessary to destroy the string object!!!
- virtual const char * what() const throw (){
+ virtual const char* what() const throw (){
return msgstr.c_str();
}
protected:
index 4ccfa59524720c04365036bf6ca89a44e4f55726..8b0a2f62a7cedbdbe2ee4ed7c8abad33d51090b3 100644 (file)
return new_bpath;
}
- catch (std::exception e) {
+ catch (std::exception & e) {
g_warning("Exception during LPE %s execution. \n %s", getName().c_str(), e.what());
SP_ACTIVE_DESKTOP->messageStack()->flash( Inkscape::WARNING_MESSAGE,
_("An exception occurred during execution of the Path Effect.") );
index b47e26d124d753063bde895fca571302cf6e2642..5dd8e66f23164ab2f3fae3adcc5f81f0bea98fca 100644 (file)
try {
img = Gdk::Pixbuf::create_from_file(fileName);
}
- catch (Glib::FileError e)
+ catch (Glib::FileError & e)
{
g_message("caught Glib::FileError in SVGPreview::showImage");
return;
}
- catch (Gdk::PixbufError e)
+ catch (Gdk::PixbufError & e)
{
g_message("Gdk::PixbufError in SVGPreview::showImage");
return;