diff -r 660db48f324f -r 53c5277ba294 lemon/preflow.h --- a/lemon/preflow.h Fri Nov 21 14:11:29 2008 +0000 +++ b/lemon/preflow.h Fri Nov 21 14:26:58 2008 +0000 @@ -19,7 +19,6 @@ #ifndef LEMON_PREFLOW_H #define LEMON_PREFLOW_H -#include #include #include @@ -132,17 +131,6 @@ typedef typename Traits::Elevator Elevator; typedef typename Traits::Tolerance Tolerance; - /// \brief \ref Exception for uninitialized parameters. - /// - /// This error represents problems in the initialization - /// of the parameters of the algorithms. - class UninitializedParameter : public lemon::Exception { - public: - virtual const char* what() const throw() { - return "lemon::Preflow::UninitializedParameter"; - } - }; - private: TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); @@ -208,7 +196,8 @@ struct DefFlowMapTraits : public Traits { typedef _FlowMap FlowMap; static FlowMap *createFlowMap(const Digraph&) { - throw UninitializedParameter(); + LEMON_ASSERT(false, "FlowMap is not initialized"); + return 0; // ignore warnings } }; @@ -228,7 +217,8 @@ struct DefElevatorTraits : public Traits { typedef _Elevator Elevator; static Elevator *createElevator(const Digraph&, int) { - throw UninitializedParameter(); + LEMON_ASSERT(false, "Elevator is not initialized"); + return 0; // ignore warnings } };