~verifypn-cpn/verifypn/col_weight_fix

« back to all changes in this revision

Viewing changes to PetriEngine/AbstractPetriNetBuilder.h

  • Committer: Peter G. Jensen
  • Date: 2018-05-12 15:14:12 UTC
  • mto: (204.2.1 verifypn)
  • mto: This revision was merged to the branch mainline in revision 205.
  • Revision ID: peter.gjoel@gmail.com-20180512151412-o0nrg0201xq5n31r
fixed usage of error-codes, changes from cout to cerr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
                double x = 0,
47
47
                double y = 0)
48
48
        {
49
 
            std::cout << "Colored places are not supported in standard P/T nets" << std::endl;
50
 
            exit(-1);
 
49
            std::cerr << "Colored places are not supported in standard P/T nets" << std::endl;
 
50
            exit(ErrorCode);
51
51
        }
52
52
        /** Add a new transition with a unique name */
53
53
        virtual void addTransition(const std::string& name,
59
59
                double x = 0,
60
60
                double y = 0)
61
61
        {
62
 
            std::cout << "Colored transitions are not supported in standard P/T nets" << std::endl;
63
 
            exit(-1);
 
62
            std::cerr << "Colored transitions are not supported in standard P/T nets" << std::endl;
 
63
            exit(ErrorCode);
64
64
        }
65
65
        /** Add input arc with given weight */
66
66
        virtual void addInputArc(const std::string& place,
72
72
                const std::string& transition,
73
73
                Colored::ArcExpression_ptr expr)
74
74
        {
75
 
            std::cout << "Colored input arcs are not supported in standard P/T nets" << std::endl;
76
 
            exit(-1);
 
75
            std::cerr << "Colored input arcs are not supported in standard P/T nets" << std::endl;
 
76
            exit(ErrorCode);
77
77
        }
78
78
        /** Add output arc with given weight */
79
79
        virtual void addOutputArc(const std::string& transition,
84
84
                const std::string& place,
85
85
                Colored::ArcExpression_ptr expr)
86
86
        {
87
 
            std::cout << "Colored output arcs are not supported in standard P/T nets" << std::endl;
88
 
            exit(-1);
 
87
            std::cerr << "Colored output arcs are not supported in standard P/T nets" << std::endl;
 
88
            exit(ErrorCode);
89
89
        }
90
90
        /** Add color types with id */
91
91
        virtual void addColorType(const std::string& id,
92
92
                Colored::ColorType* type)
93
93
        {
94
 
            std::cout << "Color types are not supported in standard P/T nets" << std::endl;
95
 
            exit(-1);
 
94
            std::cerr << "Color types are not supported in standard P/T nets" << std::endl;
 
95
            exit(ErrorCode);
96
96
        }
97
97
        
98
98
        virtual void enableColors() {