Changeset 8312


Ignore:
Timestamp:
Nov 30, 2015 10:15:44 PM (4 years ago)
Author:
Iakov Nakhimovski
Message:

#4700:

Changed jmi_log_comment into jmi_log_node in the jmi_get_set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/RuntimeLibrary/src/modules/jmi_get_set_module/jmi_get_set.c

    r8305 r8312  
    7676        if( needParameterUpdate ) {
    7777          if(jmi_init_eval_parameters(jmi) != 0) {
    78                 jmi_log_comment(jmi->log, logError, "Error evaluating dependent parameters.");
     78                jmi_log_node(jmi->log, logError, "DependentParametersEvaluationFailed", "Error evaluating dependent parameters.");
    7979                return -1;
    8080          }
     
    117117        if( needParameterUpdate ) {
    118118           if(jmi_init_eval_parameters(jmi) != 0) {
    119                 jmi_log_comment(jmi->log, logError, "Error evaluating dependent parameters.");
     119                jmi_log_node(jmi->log, logError, "DependentParametersEvaluationFailed", "Error evaluating dependent parameters.");
    120120                return -1;
    121121           }
     
    155155        if( needParameterUpdate ) {
    156156           if(jmi_init_eval_parameters(jmi) != 0) {
    157                 jmi_log_comment(jmi->log, logError, "Error evaluating dependent parameters.");
     157                jmi_log_node(jmi->log, logError, "DependentParametersEvaluationFailed", "Error evaluating dependent parameters.");
    158158                return -1;
    159159           }
     
    171171
    172172    RECOMPUTE_VARIABLES_SET(jmi);
    173     jmi_log_comment(jmi->log, logWarning, "Strings are not yet supported.");
     173    jmi_log_node(jmi->log, logWarning, "NotSupported", "Setting strings is not yet supported.");
    174174    return 0;
    175175}
     
    190190        retval = jmi_ode_derivatives(jmi);
    191191        if(retval != 0) {
    192             jmi_log_comment(jmi->log, logError, "Evaluating the derivatives failed.");
     192            jmi_log_node(jmi->log, logError, "ModelEquationsEvaluationFailed", "Error evaluating model equations.");
     193            /* If it failed, reset to the previous succesful values */
     194            jmi_reset_internal_variables(jmi);
     195
    193196            return -1;
    194197        }
     
    226229        retval = jmi_ode_derivatives(jmi);
    227230        if(retval != 0) {
    228             jmi_log_comment(jmi->log, logError, "Evaluating the derivatives failed.");
     231            jmi_log_node(jmi->log, logError, "ModelEquationsEvaluationFailed", "Error evaluating model equations.");
     232            /* If it failed, reset to the previous succesful values */
     233            jmi_reset_internal_variables(jmi);
     234
    229235            return -1;
    230236        }
     
    261267        retval = jmi_ode_derivatives(jmi);
    262268        if(retval != 0) {
    263             jmi_log_comment(jmi->log, logError, "Evaluating the derivatives failed.");
     269            jmi_log_node(jmi->log, logError, "ModelEquationsEvaluationFailed", "Error evaluating model equations.");
     270            /* If it failed, reset to the previous succesful values */
     271            jmi_reset_internal_variables(jmi);
    264272            return -1;
    265273        }
     
    289297
    290298    z = jmi_get_string_z(jmi);
     299
    291300
    292301    for (i = 0; i < nvr; i++) {
     
    365374    retval = jmi_dae_R_perturbed(jmi,eventIndicators);
    366375    if(retval != 0) {
    367         jmi_log_comment(jmi->log, logError, "Evaluating the event indicators failed.");
     376        jmi_log_node(jmi->log, logError, "EventInticatorsEvaluationFailed", "Error evaluating event indicators.");
    368377        if (jmi->jmi_callbacks.log_options.log_level >= 5){
    369378            jmi_log_leave(jmi->log, node);
Note: See TracChangeset for help on using the changeset viewer.