# HG changeset patch # User alpar # Date 1107633901 0 # Node ID 377e240b050f88a752aa1b804f5ce1e2e84fdf4d # Parent 12623f7ecb378ce37ca336d82f41b63d24cf8905 A new exception class called UninitializedParameter. diff -r 12623f7ecb37 -r 377e240b050f src/lemon/error.h --- a/src/lemon/error.h Sat Feb 05 13:40:01 2005 +0000 +++ b/src/lemon/error.h Sat Feb 05 20:05:01 2005 +0000 @@ -126,7 +126,7 @@ * in theory, these are preventable, and even detectable before the * program runs (e.g., violations of class invariants). * - * For a typical example \see UninitializedParameterError. + * A typical example for this is \ref UninitializedParameter. */ class LogicError : public Exception { public: @@ -135,6 +135,19 @@ } }; + /** + * \brief \ref Exception for uninitialized parameters. + * + * This error represents problems in the initialization + * of the parameters of the algorithms. + */ + class UninitializedParameter : public LogicError { + public: + virtual const char* exceptionName() const { + return "lemon::UninitializedParameter"; + } + }; + /** * \brief One of the two main subclasses of \ref Exception. diff -r 12623f7ecb37 -r 377e240b050f src/work/alpar/dijkstra.h --- a/src/work/alpar/dijkstra.h Sat Feb 05 13:40:01 2005 +0000 +++ b/src/work/alpar/dijkstra.h Sat Feb 05 20:05:01 2005 +0000 @@ -30,9 +30,6 @@ namespace lemon { - class UninitializedData : public LogicError {}; - - /// \addtogroup flowalgs /// @{ @@ -90,7 +87,7 @@ /// typedef typename Graph::template NodeMap PredNodeMap; ///Instantiates a PredNodeMap. - + ///This function instantiates a \ref PredNodeMap. ///\param G is the graph, to which we would like to define the \ref PredNodeMap static PredNodeMap *createPredNodeMap(const GR &G) @@ -131,7 +128,7 @@ }; ///%Dijkstra algorithm class. - + ///This class provides an efficient implementation of %Dijkstra algorithm. ///The edge lengths are passed to the algorithm using a ///\ref concept::ReadMap "ReadMap", @@ -174,8 +171,18 @@ #endif class Dijkstra { public: - ///Exception thrown by dijkstra. - class UninitializedData : public lemon::UninitializedData {}; + /** + * \brief \ref Exception for uninitialized parameters. + * + * This error represents problems in the initialization + * of the parameters of the algorithms. + */ + class UninitializedParameter : public lemon::UninitializedParameter { + public: + virtual const char* exceptionName() const { + return "lemon::Dijsktra::UninitializedParameter"; + } + }; typedef TR Traits; ///The type of the underlying graph.