Changeset 13557


Ignore:
Timestamp:
Sep 20, 2019 1:26:19 PM (3 months ago)
Author:
Jonathan Kämpe
Message:

#5844 Added better exception for when things go wrong during xml attribute evaluation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jk-2471/Compiler/GenericCodeGen/src/jastadd/GenericXMLGenerator.jrag

    r11966 r13557  
    213213    protected void generateAttributeIfSet(String name, FVariable variable, CodeStream printer) {
    214214        if (variable.attributeSet(name)) {
    215             String value = variable.attributeCValue(name).xmlValue();
    216             generateAttribute(name, value, printer);
     215            try {
     216                String value = variable.attributeCValue(name).xmlValue();
     217                generateAttribute(name, value, printer);
     218            } catch (ConstantEvaluationException e) {
     219                throw new InternalCompilerError("Exception when generating xml attribute '" +
     220                    name + "' for variable '" + variable.name() + "'.", e);
     221            }
    217222        }
    218223    }
Note: See TracChangeset for help on using the changeset viewer.