Skip to content

Rendering with invalid inputFile is not handled correctly #199

@hmariann

Description

@hmariann

Pre-requisites:

  • Java runtime 1.8

  • placingToRendering.xml exists in the rendering-1.4.0.jar's folder and is a valid inputFile (produced by placing-1.4.0.jar with the mappingToPlacing.xml as input generated by mapping-1.4.0.jar with the cdfFile generated by converter-1.4.0.jar for the input codemetropolis-toolchain-commons.graph)

  • command line opened in the folder of rendering-1.4.0.jar

Steps:

  1. Open placingToRendering.xml with a text editor

  2. Delete content from line 10 to 20 and save the file

  3. Run "java -jar rendering-1.4.0.jar -i placingToRendering.xml -w cm"

Expected result:

The tool warns the user that the input file content is invalid and exits normally without creating the output file.

Test result:

	The tool halts with an error message saying "[Fatal Error] placingToRendering2.xml:2609:19: The element type "buildables" must be terminated by the matching end-tag "</buildables>". Error: Input XML is not in CMXML format.". The log file contains the following exception and stack trace: 
	logError
    SEVERE: Error: Input XML is not in CMXML format.

    codemetropolis.toolchain.commons.cmxml.exceptions.CmxmlValidationFailedException
        at codemetropolis.toolchain.rendering.RenderingExecutor.execute(RenderingExecutor.java:57)
        at codemetropolis.toolchain.rendering.Main.main(Main.java:73)

Related TC:

Current develop branch version
First commit link version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions