Changing exception names.
authordeba
Fri, 11 Mar 2005 18:54:18 +0000
changeset 121439993ada11c7
parent 1213 6cc106135d31
child 1215 81b4731f8a6b
Changing exception names.
Compile sentry fix.
src/lemon/graph_reader.h
src/lemon/graph_writer.h
     1.1 --- a/src/lemon/graph_reader.h	Fri Mar 11 16:44:20 2005 +0000
     1.2 +++ b/src/lemon/graph_reader.h	Fri Mar 11 18:54:18 2005 +0000
     1.3 @@ -18,6 +18,9 @@
     1.4  ///\file
     1.5  ///\brief Graph reader.
     1.6  
     1.7 +#ifndef LEMON_GRAPH_READER_H
     1.8 +#define LEMON_GRAPH_READER_H
     1.9 +
    1.10  #include <iostream>
    1.11  #include <sstream>
    1.12  
    1.13 @@ -28,13 +31,9 @@
    1.14  
    1.15  #include <lemon/error.h>
    1.16  
    1.17 -/// \todo fix exceptions
    1.18 -
    1.19  
    1.20  namespace lemon {
    1.21  
    1.22 -  // Exceptions
    1.23 -
    1.24  
    1.25    /// \brief Standard ReaderTraits for the GraphReader class.
    1.26    ///
    1.27 @@ -229,7 +228,7 @@
    1.28        if (node_map_readers.find(name) != node_map_readers.end()) {
    1.29  	ErrorMessage msg;
    1.30  	msg << "Multiple read rule for node map: " << name;
    1.31 -	throw IOLogicError(msg.message());
    1.32 +	throw IOParameterError(msg.message());
    1.33        }
    1.34        node_map_readers.insert(
    1.35          make_pair(name, new MapReader<Node, Map, Reader>(map, reader)));
    1.36 @@ -245,7 +244,7 @@
    1.37        if (node_map_readers.find(name) != node_map_readers.end()) {
    1.38  	ErrorMessage msg;
    1.39  	msg << "Multiple read rule for node map: " << name;
    1.40 -	throw IOLogicError(msg.message());
    1.41 +	throw IOParameterError(msg.message());
    1.42        }
    1.43        node_map_readers.insert(
    1.44          make_pair(name, new SkipReader<Node, Reader>(reader)));
    1.45 @@ -271,7 +270,7 @@
    1.46        if (edge_map_readers.find(name) != edge_map_readers.end()) {
    1.47  	ErrorMessage msg;
    1.48  	msg << "Multiple read rule for edge map: " << name;
    1.49 -	throw IOLogicError(msg.message());
    1.50 +	throw IOParameterError(msg.message());
    1.51        }
    1.52        edge_map_readers.insert(
    1.53          make_pair(name, new MapReader<Edge, Map, Reader>(map, reader)));
    1.54 @@ -287,7 +286,7 @@
    1.55        if (edge_map_readers.find(name) != edge_map_readers.end()) {
    1.56  	ErrorMessage msg;
    1.57  	msg << "Multiple read rule for edge map: " << name;
    1.58 -	throw IOLogicError(msg.message());
    1.59 +	throw IOParameterError(msg.message());
    1.60        }
    1.61        edge_map_readers.insert(
    1.62          make_pair(name, new SkipReader<Edge, Reader>(reader)));
    1.63 @@ -301,7 +300,7 @@
    1.64        if (node_readers.find(name) != node_readers.end()) {
    1.65  	ErrorMessage msg;
    1.66  	msg << "Multiple read rule for node: " << name;
    1.67 -	throw IOLogicError(msg.message());
    1.68 +	throw IOParameterError(msg.message());
    1.69        }
    1.70        node_readers.insert(make_pair(name, &node));
    1.71        return *this;
    1.72 @@ -314,7 +313,7 @@
    1.73        if (edge_readers.find(name) != edge_readers.end()) {
    1.74  	ErrorMessage msg;
    1.75  	msg << "Multiple read rule for edge: " << name;
    1.76 -	throw IOLogicError(msg.message());
    1.77 +	throw IOParameterError(msg.message());
    1.78        }
    1.79        edge_readers.insert(make_pair(name, &edge));
    1.80        return *this;
    1.81 @@ -693,3 +692,5 @@
    1.82    }
    1.83  
    1.84  }
    1.85 +
    1.86 +#endif
     2.1 --- a/src/lemon/graph_writer.h	Fri Mar 11 16:44:20 2005 +0000
     2.2 +++ b/src/lemon/graph_writer.h	Fri Mar 11 18:54:18 2005 +0000
     2.3 @@ -18,6 +18,8 @@
     2.4  ///\file
     2.5  ///\brief Graph writer.
     2.6  
     2.7 +#ifndef LEMON_GRAPH_WRITER_H
     2.8 +#define LEMON_GRAPH_WRITER_H
     2.9  
    2.10  #include <iostream>
    2.11  #include <sstream>
    2.12 @@ -28,6 +30,7 @@
    2.13  #include <memory>
    2.14  
    2.15  #include <lemon/map_utils.h>
    2.16 +
    2.17  #include <lemon/invalid.h>
    2.18  #include <lemon/error.h>
    2.19  
    2.20 @@ -444,3 +447,5 @@
    2.21  
    2.22  
    2.23  }
    2.24 +
    2.25 +#endif