ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/types/BondStamp.hpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/types/BondStamp.hpp (file contents):
Revision 2469 by tim, Fri Dec 2 15:38:03 2005 UTC vs.
Revision 2544 by tim, Wed Jan 11 19:01:20 2006 UTC

# Line 48 | Line 48 | class BondStamp : public DataHolder {
48   class BondStamp : public DataHolder {
49  
50      public:
51 <      bool setMembers(std::vector<int> members) {
52 <        bool ret = false;
51 >      void setMembers(std::vector<int> members) {
52          if (members.size() ==2) {
53              a = members[0];
54              b = members[1];
55 <            ret = true;
55 >            if (a < 0 || b < 0) {
56 >                std::ostringstream oss;
57 >                oss << "BondStamp Error: members" << containerToString(members) << " is an invalid" << std::endl;
58 >                throw OOPSEException(oss.str());
59 >            }
60 >        } else {
61 >            std::ostringstream oss;
62 >            oss << "BondStamp Error: members" << containerToString(members) << " is an invalid" << std::endl;
63 >            throw OOPSEException(oss.str());
64          }
65 +        
66  
59        return ret;
67        }
68        
69        int getA() {return a;}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines