Changeset 498


Ignore:
Timestamp:
Aug 25, 2005 4:45:44 PM (14 years ago)
Author:
andreasw
Message:

enabled printlevel for exceptions and avoid output of benign exceptions

Location:
branches/dev
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/Algorithm/IpFilterLineSearch.cpp

    r493 r498  
    716716        }
    717717        catch(IpoptNLP::Eval_Error& e) {
    718           e.ReportException(Jnlst());
     718          e.ReportException(Jnlst(), J_DETAILED);
    719719          Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    720720                         "Warning: Cutting back alpha due to evaluation error\n");
     721          IpData().Append_info_string("e");
    721722          accept = false;
    722723          evaluation_error = true;
     
    10071008    }
    10081009    catch(IpoptNLP::Eval_Error& e) {
    1009       e.ReportException(Jnlst());
     1010      e.ReportException(Jnlst(), J_DETAILED);
    10101011      Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    10111012                     "Warning: Evaluation error during soft restoration phase step.\n");
     1013      IpData().Append_info_string("e");
    10121014      return false;
    10131015    }
     
    10331035    }
    10341036    catch(IpoptNLP::Eval_Error& e) {
    1035       e.ReportException(Jnlst());
     1037      e.ReportException(Jnlst(), J_DETAILED);
    10361038      Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    10371039                     "Warning: Evaluation error during soft restoration phase step.\n");
     1040      IpData().Append_info_string("e");
    10381041      return false;
    10391042    }
     
    12501253      }
    12511254      catch(IpoptNLP::Eval_Error& e) {
    1252         e.ReportException(Jnlst());
     1255        e.ReportException(Jnlst(), J_DETAILED);
    12531256        Jnlst().Printf(J_WARNING, J_MAIN, "Warning: SOC step rejected due to evaluation error\n");
     1257        IpData().Append_info_string("e");
    12541258        accept = false;
    12551259        // There is no point in continuing SOC procedure
     
    14461450    }
    14471451    catch(IpoptNLP::Eval_Error& e) {
    1448       e.ReportException(Jnlst());
     1452      e.ReportException(Jnlst(), J_DETAILED);
    14491453      Jnlst().Printf(J_WARNING, J_MAIN,
    14501454                     "Warning: Corrector step rejected due to evaluation error\n");
     1455      IpData().Append_info_string("e");
    14511456      accept = false;
    14521457    }
  • branches/dev/Algorithm/IpIpoptAlg.cpp

    r493 r498  
    182182    }
    183183    catch(TINY_STEP_DETECTED& exc) {
    184       exc.ReportException(Jnlst());
     184      exc.ReportException(Jnlst(), J_DETAILED);
    185185      return STOP_AT_TINY_STEP;
    186186    }
    187187    catch(ACCEPTABLE_POINT_REACHED& exc) {
    188       exc.ReportException(Jnlst());
     188      exc.ReportException(Jnlst(), J_DETAILED);
    189189      return STOP_AT_ACCEPTABLE_POINT;
    190190    }
    191191    catch(LOCALLY_INFEASIBLE& exc) {
    192       exc.ReportException(Jnlst());
     192      exc.ReportException(Jnlst(), J_DETAILED);
    193193      return LOCAL_INFEASIBILITY;
    194194    }
    195195    catch(RESTORATION_FAILED& exc) {
    196       exc.ReportException(Jnlst());
     196      exc.ReportException(Jnlst(), J_DETAILED);
    197197      return RESTORATION_FAILURE;
    198198    }
    199199    catch(FEASIBILITY_PROBLEM_SOLVED& exc) {
    200       exc.ReportException(Jnlst());
     200      exc.ReportException(Jnlst(), J_DETAILED);
    201201      return SUCCESS;
    202202    }
  • branches/dev/Common/IpException.hpp

    r387 r498  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    8484
    8585    /** Method to report the exception to a journalist */
    86     void ReportException(const Journalist& jnlst) const
     86    void ReportException(const Journalist& jnlst,
     87                         EJournalLevel level = J_ERROR) const
    8788    {
    88       jnlst.Printf(J_ERROR, J_MAIN,
     89      jnlst.Printf(level, J_MAIN,
    8990                   "Exception of type: %s in file \"%s\" at line %d:\n Exception message: %s\n",
    9091                   type_.c_str(), file_name_.c_str(),  line_number_, msg_.c_str());
Note: See TracChangeset for help on using the changeset viewer.