COIN-OR::LEMON - Graph Library

Changeset 1774:9fd56d75293e in lemon-0.x


Ignore:
Timestamp:
11/04/05 17:40:54 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2306
Message:

UnsupportedException? on erase with Snapshot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r1770 r1774  
    3131#include <lemon/bits/undir_graph_extender.h>
    3232
     33#include <lemon/error.h>
     34
    3335#include <list>
    3436
     
    441443                     protected AlterationNotifier<Edge>::ObserverBase
    442444    {
     445    public:
     446     
     447      class UnsupportedOperation : public LogicError {
     448      public:
     449        virtual const char* exceptionName() const {
     450          return "lemon::ListGraph::Snapshot::UnsupportedOperation";
     451        }
     452      };
     453           
     454
    443455      protected:
    444456     
     
    451463        added_nodes.push_back(n);
    452464      };
    453       ///\bug Exception...
    454       ///
    455465      virtual void erase(const Node&)
    456466      {
    457         exit(1);
     467        throw UnsupportedOperation();
    458468      }
    459469      virtual void add(const Edge& n) {
    460470        added_edges.push_back(n);
    461471      };
    462       ///\bug Exception...
    463       ///
    464472      virtual void erase(const Edge&)
    465473      {
    466         exit(1);
     474        throw UnsupportedOperation();
    467475      }
    468476
     
    489497        g=0;
    490498      }
    491            
     499
    492500    public:
    493501      ///Default constructur.
Note: See TracChangeset for help on using the changeset viewer.