COIN-OR::LEMON - Graph Library

Changeset 390:53c5277ba294 in lemon-1.2


Ignore:
Timestamp:
11/21/08 15:26:58 (16 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Get rid of exceptions in Preflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/preflow.h

    r389 r390  
    2020#define LEMON_PREFLOW_H
    2121
    22 #include <lemon/error.h>
    2322#include <lemon/tolerance.h>
    2423#include <lemon/elevator.h>
     
    133132    typedef typename Traits::Tolerance Tolerance;
    134133
    135     /// \brief \ref Exception for uninitialized parameters.
    136     ///
    137     /// This error represents problems in the initialization
    138     /// of the parameters of the algorithms.
    139     class UninitializedParameter : public lemon::Exception {
    140     public:
    141       virtual const char* what() const throw() {
    142         return "lemon::Preflow::UninitializedParameter";
    143       }
    144     };
    145 
    146134  private:
    147135
     
    209197      typedef _FlowMap FlowMap;
    210198      static FlowMap *createFlowMap(const Digraph&) {
    211         throw UninitializedParameter();
     199        LEMON_ASSERT(false, "FlowMap is not initialized");
     200        return 0; // ignore warnings
    212201      }
    213202    };
     
    229218      typedef _Elevator Elevator;
    230219      static Elevator *createElevator(const Digraph&, int) {
    231         throw UninitializedParameter();
     220        LEMON_ASSERT(false, "Elevator is not initialized");
     221        return 0; // ignore warnings
    232222      }
    233223    };
Note: See TracChangeset for help on using the changeset viewer.