Ignore:
Timestamp:
Nov 4, 2019 1:17:44 PM (5 weeks ago)
Author:
Jesper Mattsson
Message:

Added a try-catch for a missed possible ConstantEvaluationException. (#5835)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/ModelicaFlatTree/src/jastadd/FlatAPI/FlatAPI.jrag

    r13897 r13944  
    44774477            FExp fmt = getFormat();
    44784478            FExp exp = fmt.treeCopy();
    4479             if (!formatSpecifier().initialPercent) {
     4479            boolean initialPercent = false;
     4480            try {
     4481                initialPercent = formatSpecifier().initialPercent;
     4482            } catch (ConstantEvaluationException e) {
     4483                // If we can't evaluate it here, assume there is no "%"
     4484            }
     4485            if (!initialPercent) {
    44804486                exp = new FStringAddExp(new FStringLitExp("%"), exp);
    44814487            }
Note: See TracChangeset for help on using the changeset viewer.