/[ascend]/trunk/pygtk/simulation.cpp
ViewVC logotype

Diff of /trunk/pygtk/simulation.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 931 by johnpye, Mon Nov 6 07:49:06 2006 UTC revision 932 by johnpye, Thu Nov 23 13:23:33 2006 UTC
# Line 177  Simulation::run(const Method &method, In Line 177  Simulation::run(const Method &method, In
177      Nam name = Nam(method.getSym());      Nam name = Nam(method.getSym());
178      //cerr << "CREATED NAME '" << name.getName() << "'" << endl;      //cerr << "CREATED NAME '" << name.getName() << "'" << endl;
179    
180        error_reporter_tree_start();
181    
182      Proc_enum pe;      Proc_enum pe;
183      pe = Initialize(      pe = Initialize(
# Line 185  Simulation::run(const Method &method, In Line 186  Simulation::run(const Method &method, In
186          ,0, NULL, NULL          ,0, NULL, NULL
187      );      );
188    
189        int haserror=0;
190        if(error_reporter_tree_has_error()){
191            haserror=1;
192        }
193        error_reporter_tree_end();
194    
195      // clear out the 'sim' pointer (soon it will be invalid)      // clear out the 'sim' pointer (soon it will be invalid)
196      importhandler_setsharedpointer("sim",NULL);      importhandler_setsharedpointer("sim",NULL);
197      CONSOLE_DEBUG("Cleared shared pointer 'sim'");      CONSOLE_DEBUG("Cleared shared pointer 'sim'");
198    
199      if(pe == Proc_all_ok){      if(pe == Proc_all_ok){
200          ERROR_REPORTER_NOLINE(ASC_PROG_NOTE,"Method '%s' was run (check above for errors)\n",method.getName());          if(haserror){
201                ERROR_REPORTER_NOLINE(ASC_PROG_ERR,"Method '%s' had error(s).",method.getName());
202                stringstream ss;
203                ss << "Method '"<<method.getName()<<"' returned 'all_ok' status but output error(s)";
204                throw runtime_error(ss.str());
205            }else{
206                ERROR_REPORTER_NOLINE(ASC_USER_SUCCESS,"Method '%s' returned 'all_ok' and output no errors.\n",method.getName());
207            }
208          //cerr << "METHOD " << method.getName() << " COMPLETED OK" << endl;          //cerr << "METHOD " << method.getName() << " COMPLETED OK" << endl;
209      }else{      }else{
210          stringstream ss;          stringstream ss;

Legend:
Removed from v.931  
changed lines
  Added in v.932

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22