Fatal message should terminate XSL #2894
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updates the
output-message
routine so that if a message is defined withtype="FATAL"
, the XSL will terminate.Motivation and Context
I was trying to add a fatal-severity message to a custom XSL file, and noticed that it was generated (with
[FATAL]
in the message) but that the build continued to the normal end. A few years back, this would have stopped the buildCause: messages used to be generated by passing in a message ID, a message, and a severity, which were combined with a hard-coded prefix. If the severity was
F
, the message was generated in a way that terminated the process.This method of calling messages was deprecated some releases ago; now you just pass in the ID and optional parameters. When a message is fatal, the message definition should specify
type="FATAL"
. We do not ship any fatal messages intended for XSL but it should be possible to create them; here's the syntax of another fatal message:<message id="DOTA001F" type="FATAL">
This code update fixes the code so that in addition to checking the old param for
$msgsev='F'
, it reads the message and checks for@type='FATAL'
.How Has This Been Tested?
<title>
elementsDOTX041W
<message id="DOTX041W" type="FATAL">
Type of Changes
Bug fix - restores a simple feature that was broken / unavailable unless using deprecated code.