Index: lemon/error.h
===================================================================
--- lemon/error.h	(revision 290)
+++ lemon/error.h	(revision 291)
@@ -42,9 +42,9 @@
   class Exception : public std::exception {
   public:
-    ///\e Constructor
-    Exception() {}
-    ///\e Virtual destructor
+    ///Constructor
+    Exception() throw() {}
+    ///Virtual destructor
     virtual ~Exception() throw() {}
-    ///\e A short description of the exception
+    ///A short description of the exception
     virtual const char* what() const throw() {
       return "lemon::Exception";
@@ -65,5 +65,5 @@
 
     /// Copy constructor
-    IoError(const IoError &error) {
+    IoError(const IoError &error) throw() : Exception() {
       message(error._message);
       file(error._file);
@@ -71,15 +71,16 @@
 
     /// Constructor
-    explicit IoError(const char *message) {
-      IoError::message(message);
-    }
-
-    /// Constructor
-    explicit IoError(const std::string &message) {
-      IoError::message(message);
-    }
-
-    /// Constructor
-    IoError(const std::string &file, const char *message) {
+    explicit IoError(const char *message) throw() {
+      IoError::message(message);
+    }
+
+    /// Constructor
+    explicit IoError(const std::string &message) throw() {
+      IoError::message(message);
+    }
+
+    /// Constructor
+    explicit IoError(const char *message,
+                     const std::string &file) throw() {
       IoError::message(message);
       IoError::file(file);
@@ -87,5 +88,6 @@
 
     /// Constructor
-    IoError(const std::string &file, const std::string &message) {
+    explicit IoError(const std::string &message,
+                     const std::string &file) throw() {
       IoError::message(message);
       IoError::file(file);
@@ -96,12 +98,12 @@
 
     /// Set the error message
-    void message(const char *message) {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the error message
-    void message(const std::string& message) {
+    void message(const char *message) throw() {
+      try {
+        _message = message;
+      } catch (...) {}
+    }
+
+    /// Set the error message
+    void message(const std::string& message) throw() {
       try {
         _message = message;
@@ -110,5 +112,5 @@
 
     /// Set the file name
-    void file(const std::string &file) {
+    void file(const std::string &file) throw() {
       try {
         _file = file;
@@ -117,5 +119,5 @@
 
     /// Returns the error message
-    const std::string& message() const {
+    const std::string& message() const throw() {
       return _message;
     }
@@ -123,7 +125,6 @@
     /// \brief Returns the filename
     ///
-    /// Returns the filename or empty string if the filename was not
-    /// specified.
-    const std::string& file() const {
+    /// Returns the filename or an empty string if it was not specified.
+    const std::string& file() const throw() {
       return _file;
     }
@@ -131,6 +132,6 @@
     /// \brief Returns a short error message
     ///
-    /// Returns a short error message which contains the message, the
-    /// file name and the line number.
+    /// Returns a short error message which contains the message and the
+    /// file name.
     virtual const char* what() const throw() {
       try {
@@ -138,9 +139,7 @@
         std::ostringstream oss;
         oss << "lemon:IoError" << ": ";
-        oss << message();
-        if (!file().empty()) {
-          oss << " (";
-          if (!file().empty()) oss << "with file '" << file() << "'";
-          oss << ")";
+        oss << _message;
+        if (!_file.empty()) {
+          oss << " ('" << _file << "')";
         }
         _what = oss.str();
@@ -155,6 +154,6 @@
   /// \brief Format error
   ///
-  /// This class is used to indicate if an input file has wrong
-  /// formatting, or a data representation is not legal.
+  /// This exception is thrown when an input file has wrong
+  /// format or a data representation is not legal.
   class FormatError : public Exception {
   protected:
@@ -167,5 +166,5 @@
 
     /// Copy constructor
-    FormatError(const FormatError &error) {
+    FormatError(const FormatError &error) throw() : Exception() {
       message(error._message);
       file(error._file);
@@ -174,5 +173,5 @@
 
     /// Constructor
-    explicit FormatError(const char *message) {
+    explicit FormatError(const char *message) throw() {
       FormatError::message(message);
       _line = 0;
@@ -180,5 +179,5 @@
 
     /// Constructor
-    explicit FormatError(const std::string &message) {
+    explicit FormatError(const std::string &message) throw() {
       FormatError::message(message);
       _line = 0;
@@ -186,5 +185,6 @@
 
     /// Constructor
-    FormatError(const std::string &file, int line, const char *message) {
+    explicit FormatError(const char *message,
+                         const std::string &file, int line = 0) throw() {
       FormatError::message(message);
       FormatError::file(file);
@@ -193,5 +193,6 @@
 
     /// Constructor
-    FormatError(const std::string &file, int line, const std::string &message) {
+    explicit FormatError(const std::string &message,
+                         const std::string &file, int line = 0) throw() {
       FormatError::message(message);
       FormatError::file(file);
@@ -203,15 +204,15 @@
 
     /// Set the line number
-    void line(int line) { _line = line; }
-
-    /// Set the error message
-    void message(const char *message) {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the error message
-    void message(const std::string& message) {
+    void line(int line) throw() { _line = line; }
+
+    /// Set the error message
+    void message(const char *message) throw() {
+      try {
+        _message = message;
+      } catch (...) {}
+    }
+
+    /// Set the error message
+    void message(const std::string& message) throw() {
       try {
         _message = message;
@@ -220,5 +221,5 @@
 
     /// Set the file name
-    void file(const std::string &file) {
+    void file(const std::string &file) throw() {
       try {
         _file = file;
@@ -229,8 +230,8 @@
     ///
     /// Returns the line number or zero if it was not specified.
-    int line() const { return _line; }
+    int line() const throw() { return _line; }
 
     /// Returns the error message
-    const std::string& message() const {
+    const std::string& message() const throw() {
       return _message;
     }
@@ -238,7 +239,6 @@
     /// \brief Returns the filename
     ///
-    /// Returns the filename or empty string if the filename was not
-    /// specified.
-    const std::string& file() const {
+    /// Returns the filename or an empty string if it was not specified.
+    const std::string& file() const throw() {
       return _file;
     }
@@ -253,10 +253,10 @@
         std::ostringstream oss;
         oss << "lemon:FormatError" << ": ";
-        oss << message();
-        if (!file().empty() || line() != 0) {
+        oss << _message;
+        if (!_file.empty() || _line != 0) {
           oss << " (";
-          if (!file().empty()) oss << "in file '" << file() << "'";
-          if (!file().empty() && line() != 0) oss << " ";
-          if (line() != 0) oss << "at line " << line();
+          if (!_file.empty()) oss << "in file '" << _file << "'";
+          if (!_file.empty() && _line != 0) oss << " ";
+          if (_line != 0) oss << "at line " << _line;
           oss << ")";
         }
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 290)
+++ lemon/graph_to_eps.h	(revision 291)
@@ -1171,5 +1171,5 @@
   if (!(*os)) {
     delete os;
-    throw IoError(file_name, "Cannot write file");
+    throw IoError("Cannot write file", file_name);
   }
   return GraphToEps<DefaultGraphToEpsTraits<G> >
@@ -1192,5 +1192,5 @@
   if (!(*os)) {
     delete os;
-    throw IoError(file_name, "Cannot write file");
+    throw IoError("Cannot write file", file_name);
   }
   return GraphToEps<DefaultGraphToEpsTraits<G> >
Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 290)
+++ lemon/lgf_reader.h	(revision 291)
@@ -517,5 +517,5 @@
         _use_nodes(false), _use_arcs(false),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -529,5 +529,5 @@
         _use_nodes(false), _use_arcs(false),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -880,5 +880,5 @@
           if (jt == maps.end()) {
             std::ostringstream msg;
-            msg << "Map not found in file: " << _node_maps[i].first;
+            msg << "Map not found: " << _node_maps[i].first;
             throw FormatError(msg.str());
           }
@@ -909,5 +909,5 @@
         }
         if (line >> std::ws >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         Node n;
@@ -918,5 +918,5 @@
         } else {
           if (label_index == -1)
-            throw FormatError("Label map not found in file");
+            throw FormatError("Label map not found");
           typename std::map<std::string, Node>::iterator it =
             _node_index.find(tokens[label_index]);
@@ -973,5 +973,5 @@
           if (jt == maps.end()) {
             std::ostringstream msg;
-            msg << "Map not found in file: " << _arc_maps[i].first;
+            msg << "Map not found: " << _arc_maps[i].first;
             throw FormatError(msg.str());
           }
@@ -1011,5 +1011,5 @@
         }
         if (line >> std::ws >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         Arc a;
@@ -1039,5 +1039,5 @@
         } else {
           if (label_index == -1)
-            throw FormatError("Label map not found in file");
+            throw FormatError("Label map not found");
           typename std::map<std::string, Arc>::iterator it =
             _arc_index.find(tokens[label_index]);
@@ -1074,5 +1074,5 @@
           throw FormatError("Attribute value not found");
         if (line >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         {
@@ -1080,5 +1080,5 @@
           if (it != read_attr.end()) {
             std::ostringstream msg;
-            msg << "Multiple occurence of attribute " << attr;
+            msg << "Multiple occurence of attribute: " << attr;
             throw FormatError(msg.str());
           }
@@ -1102,5 +1102,5 @@
         if (read_attr.find(it->first) == read_attr.end()) {
           std::ostringstream msg;
-          msg << "Attribute not found in file: " << it->first;
+          msg << "Attribute not found: " << it->first;
           throw FormatError(msg.str());
         }
@@ -1118,7 +1118,4 @@
     void run() {
       LEMON_ASSERT(_is != 0, "This reader assigned to an other reader");
-      if (!*_is) {
-        throw FormatError("Cannot find file");
-      }
 
       bool nodes_done = _skip_nodes;
@@ -1139,5 +1136,5 @@
 
           if (line >> c)
-            throw FormatError("Extra character on the end of line");
+            throw FormatError("Extra character at the end of line");
 
           if (section == "nodes" && !nodes_done) {
@@ -1309,5 +1306,5 @@
         _use_nodes(false), _use_edges(false),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -1321,5 +1318,5 @@
         _use_nodes(false), _use_edges(false),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -1716,5 +1713,5 @@
           if (jt == maps.end()) {
             std::ostringstream msg;
-            msg << "Map not found in file: " << _node_maps[i].first;
+            msg << "Map not found: " << _node_maps[i].first;
             throw FormatError(msg.str());
           }
@@ -1745,5 +1742,5 @@
         }
         if (line >> std::ws >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         Node n;
@@ -1754,5 +1751,5 @@
         } else {
           if (label_index == -1)
-            throw FormatError("Label map not found in file");
+            throw FormatError("Label map not found");
           typename std::map<std::string, Node>::iterator it =
             _node_index.find(tokens[label_index]);
@@ -1809,5 +1806,5 @@
           if (jt == maps.end()) {
             std::ostringstream msg;
-            msg << "Map not found in file: " << _edge_maps[i].first;
+            msg << "Map not found: " << _edge_maps[i].first;
             throw FormatError(msg.str());
           }
@@ -1847,5 +1844,5 @@
         }
         if (line >> std::ws >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         Edge e;
@@ -1875,5 +1872,5 @@
         } else {
           if (label_index == -1)
-            throw FormatError("Label map not found in file");
+            throw FormatError("Label map not found");
           typename std::map<std::string, Edge>::iterator it =
             _edge_index.find(tokens[label_index]);
@@ -1910,5 +1907,5 @@
           throw FormatError("Attribute value not found");
         if (line >> c)
-          throw FormatError("Extra character on the end of line");
+          throw FormatError("Extra character at the end of line");
 
         {
@@ -1916,5 +1913,5 @@
           if (it != read_attr.end()) {
             std::ostringstream msg;
-            msg << "Multiple occurence of attribute " << attr;
+            msg << "Multiple occurence of attribute: " << attr;
             throw FormatError(msg.str());
           }
@@ -1938,5 +1935,5 @@
         if (read_attr.find(it->first) == read_attr.end()) {
           std::ostringstream msg;
-          msg << "Attribute not found in file: " << it->first;
+          msg << "Attribute not found: " << it->first;
           throw FormatError(msg.str());
         }
@@ -1973,5 +1970,5 @@
 
           if (line >> c)
-            throw FormatError("Extra character on the end of line");
+            throw FormatError("Extra character at the end of line");
 
           if (section == "nodes" && !nodes_done) {
@@ -2096,5 +2093,5 @@
       : _is(new std::ifstream(fn.c_str())), local_is(true),
         _filename(fn) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2105,5 +2102,5 @@
       : _is(new std::ifstream(fn)), local_is(true),
         _filename(fn) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2262,9 +2259,9 @@
 
           if (line >> c)
-            throw FormatError("Extra character on the end of line");
+            throw FormatError("Extra character at the end of line");
 
           if (extra_sections.find(section) != extra_sections.end()) {
             std::ostringstream msg;
-            msg << "Multiple occurence of section " << section;
+            msg << "Multiple occurence of section: " << section;
             throw FormatError(msg.str());
           }
@@ -2388,5 +2385,5 @@
     LgfContents(const std::string& fn)
       : _is(new std::ifstream(fn.c_str())), local_is(true) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2397,5 +2394,5 @@
     LgfContents(const char* fn)
       : _is(new std::ifstream(fn)), local_is(true) {
-      if (!(*_is)) throw IoError(fn, "Cannot open file");
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
Index: lemon/lgf_writer.h
===================================================================
--- lemon/lgf_writer.h	(revision 290)
+++ lemon/lgf_writer.h	(revision 291)
@@ -464,5 +464,5 @@
       : _os(new std::ofstream(fn.c_str())), local_os(true), _digraph(digraph),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -474,5 +474,5 @@
       : _os(new std::ofstream(fn)), local_os(true), _digraph(digraph),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1024,5 +1024,5 @@
       : _os(new std::ofstream(fn.c_str())), local_os(true), _graph(graph),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1034,5 +1034,5 @@
       : _os(new std::ofstream(fn)), local_os(true), _graph(graph),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1586,5 +1586,5 @@
     SectionWriter(const std::string& fn)
       : _os(new std::ofstream(fn.c_str())), local_os(true) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1594,5 +1594,5 @@
     SectionWriter(const char* fn)
       : _os(new std::ofstream(fn)), local_os(true) {
-      if (!(*_os)) throw IoError(fn, "Cannot write file");
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
